Merge pull request #96 from mappu/miqt-webengine

Add bindings for QtWebEngine
This commit is contained in:
mappu 2024-11-27 20:42:33 +13:00 committed by GitHub
commit 67c935c10b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
191 changed files with 37885 additions and 9 deletions

2
.gitignore vendored
View File

@ -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

View File

@ -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):

View File

@ -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
}

View File

@ -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",

View File

@ -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)

View File

@ -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
}
}
}

View File

@ -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 \

View File

@ -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()
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

@ -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()
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

6
qt/webchannel/cflags.go Normal file
View File

@ -0,0 +1,6 @@
package webchannel
/*
#cgo pkg-config: Qt5WebChannel
*/
import "C"

View File

@ -0,0 +1,128 @@
#include <QMap>
#include <QMetaObject>
#include <QObject>
#include <QQmlWebChannel>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QVariant>
#include <QWebChannel>
#include <qqmlwebchannel.h>
#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<QWebChannel*>(ret);
*outptr_QObject = static_cast<QObject*>(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<QWebChannel*>(ret);
*outptr_QObject = static_cast<QObject*>(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<char*>(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<char*>(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<struct miqt_string*>(objects.keys);
QVariant** objects_varr = static_cast<QVariant**>(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<char*>(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<int>(n));
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
struct miqt_string 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<char*>(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<int>(n));
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
void QQmlWebChannel_Delete(QQmlWebChannel* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QQmlWebChannel*>( self );
} else {
delete self;
}
}

View File

@ -0,0 +1,195 @@
package webchannel
/*
#include "gen_qqmlwebchannel.h"
#include <stdlib.h>
*/
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)
})
}

View File

@ -0,0 +1,50 @@
#pragma once
#ifndef MIQT_QT_WEBCHANNEL_GEN_QQMLWEBCHANNEL_H
#define MIQT_QT_WEBCHANNEL_GEN_QQMLWEBCHANNEL_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#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

View File

@ -0,0 +1,420 @@
#include <QChildEvent>
#include <QEvent>
#include <QMap>
#include <QMetaMethod>
#include <QMetaObject>
#include <QObject>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QTimerEvent>
#include <QWebChannel>
#include <QWebChannelAbstractTransport>
#include <qwebchannel.h>
#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<QMetaMethod*>(&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<QMetaMethod*>(&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<QObject*>(ret);
}
void QWebChannel_new2(QObject* parent, QWebChannel** outptr_QWebChannel, QObject** outptr_QObject) {
MiqtVirtualQWebChannel* ret = new MiqtVirtualQWebChannel(parent);
*outptr_QWebChannel = ret;
*outptr_QObject = static_cast<QObject*>(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<char*>(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<char*>(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<QString, QObject *> objects_QMap;
objects_QMap.reserve(objects.len);
struct miqt_string* objects_karr = static_cast<struct miqt_string*>(objects.keys);
QObject** objects_varr = static_cast<QObject**>(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<QString, QObject *> _ret = self->registeredObjects();
// Convert QMap<> from C++ memory to manually-managed C memory
struct miqt_string* _karr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.size()));
QObject** _varr = static_cast<QObject**>(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<char*>(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<void*>(_karr);
_out.values = static_cast<void*>(_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<void (QWebChannel::*)(bool)>(&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<char*>(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<int>(n));
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
struct miqt_string 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<char*>(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<int>(n));
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
void QWebChannel_override_virtual_Event(void* self, intptr_t slot) {
dynamic_cast<MiqtVirtualQWebChannel*>( (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<MiqtVirtualQWebChannel*>( (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<MiqtVirtualQWebChannel*>( (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<MiqtVirtualQWebChannel*>( (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<MiqtVirtualQWebChannel*>( (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<MiqtVirtualQWebChannel*>( (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<MiqtVirtualQWebChannel*>( (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<MiqtVirtualQWebChannel*>( self );
} else {
delete self;
}
}

View File

@ -0,0 +1,416 @@
package webchannel
/*
#include "gen_qwebchannel.h"
#include <stdlib.h>
*/
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)
})
}

View File

@ -0,0 +1,77 @@
#pragma once
#ifndef MIQT_QT_WEBCHANNEL_GEN_QWEBCHANNEL_H
#define MIQT_QT_WEBCHANNEL_GEN_QWEBCHANNEL_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#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

View File

@ -0,0 +1,386 @@
#include <QChildEvent>
#include <QEvent>
#include <QJsonObject>
#include <QMetaMethod>
#include <QMetaObject>
#include <QObject>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QTimerEvent>
#include <QWebChannelAbstractTransport>
#include <qwebchannelabstracttransport.h>
#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<QJsonObject*>(&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<QMetaMethod*>(&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<QMetaMethod*>(&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<QObject*>(ret);
}
void QWebChannelAbstractTransport_new2(QObject* parent, QWebChannelAbstractTransport** outptr_QWebChannelAbstractTransport, QObject** outptr_QObject) {
MiqtVirtualQWebChannelAbstractTransport* ret = new MiqtVirtualQWebChannelAbstractTransport(parent);
*outptr_QWebChannelAbstractTransport = ret;
*outptr_QObject = static_cast<QObject*>(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<char*>(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<char*>(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<void (QWebChannelAbstractTransport::*)(const QJsonObject&, QWebChannelAbstractTransport*)>(&QWebChannelAbstractTransport::messageReceived), self, [=](const QJsonObject& message, QWebChannelAbstractTransport* transport) {
const QJsonObject& message_ret = message;
// Cast returned reference into pointer
QJsonObject* sigval1 = const_cast<QJsonObject*>(&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<char*>(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<int>(n));
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
struct miqt_string 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<char*>(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<int>(n));
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
void QWebChannelAbstractTransport_override_virtual_SendMessage(void* self, intptr_t slot) {
dynamic_cast<MiqtVirtualQWebChannelAbstractTransport*>( (QWebChannelAbstractTransport*)(self) )->handle__SendMessage = slot;
}
void QWebChannelAbstractTransport_override_virtual_Event(void* self, intptr_t slot) {
dynamic_cast<MiqtVirtualQWebChannelAbstractTransport*>( (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<MiqtVirtualQWebChannelAbstractTransport*>( (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<MiqtVirtualQWebChannelAbstractTransport*>( (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<MiqtVirtualQWebChannelAbstractTransport*>( (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<MiqtVirtualQWebChannelAbstractTransport*>( (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<MiqtVirtualQWebChannelAbstractTransport*>( (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<MiqtVirtualQWebChannelAbstractTransport*>( (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<MiqtVirtualQWebChannelAbstractTransport*>( self );
} else {
delete self;
}
}

View File

@ -0,0 +1,371 @@
package webchannel
/*
#include "gen_qwebchannelabstracttransport.h"
#include <stdlib.h>
*/
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)
})
}

View File

@ -0,0 +1,72 @@
#pragma once
#ifndef MIQT_QT_WEBCHANNEL_GEN_QWEBCHANNELABSTRACTTRANSPORT_H
#define MIQT_QT_WEBCHANNEL_GEN_QWEBCHANNELABSTRACTTRANSPORT_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#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

6
qt/webengine/cflags.go Normal file
View File

@ -0,0 +1,6 @@
package webengine
/*
#cgo pkg-config: Qt5WebEngineWidgets
*/
import "C"

View File

@ -0,0 +1,91 @@
#include <QList>
#include <QSslCertificate>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QUrl>
#include <QWebEngineCertificateError>
#include <qwebenginecertificateerror.h>
#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<int>(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<int>(_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<char*>(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<QSslCertificate> _ret = self->certificateChain();
// Convert QList<> from C++ memory to manually-managed C memory
QSslCertificate** _arr = static_cast<QSslCertificate**>(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<void*>(_arr);
return _out;
}
void QWebEngineCertificateError_Delete(QWebEngineCertificateError* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QWebEngineCertificateError*>( self );
} else {
delete self;
}
}

View File

@ -0,0 +1,170 @@
package webengine
/*
#include "gen_qwebenginecertificateerror.h"
#include <stdlib.h>
*/
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)
})
}

View File

@ -0,0 +1,46 @@
#pragma once
#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINECERTIFICATEERROR_H
#define MIQT_QT_WEBENGINE_GEN_QWEBENGINECERTIFICATEERROR_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#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

View File

@ -0,0 +1,50 @@
#include <QList>
#include <QSslCertificate>
#include <QUrl>
#include <QWebEngineClientCertificateSelection>
#include <qwebengineclientcertificateselection.h>
#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<QSslCertificate> _ret = self->certificates();
// Convert QList<> from C++ memory to manually-managed C memory
QSslCertificate** _arr = static_cast<QSslCertificate**>(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<void*>(_arr);
return _out;
}
void QWebEngineClientCertificateSelection_Delete(QWebEngineClientCertificateSelection* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QWebEngineClientCertificateSelection*>( self );
} else {
delete self;
}
}

View File

@ -0,0 +1,108 @@
package webengine
/*
#include "gen_qwebengineclientcertificateselection.h"
#include <stdlib.h>
*/
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)
})
}

View File

@ -0,0 +1,39 @@
#pragma once
#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINECLIENTCERTIFICATESELECTION_H
#define MIQT_QT_WEBENGINE_GEN_QWEBENGINECLIENTCERTIFICATESELECTION_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#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

View File

@ -0,0 +1,33 @@
#include <QList>
#include <QSslCertificate>
#include <QSslKey>
#include <QWebEngineClientCertificateStore>
#include <qwebengineclientcertificatestore.h>
#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<QSslCertificate> _ret = self->certificates();
// Convert QList<> from C++ memory to manually-managed C memory
QSslCertificate** _arr = static_cast<QSslCertificate**>(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<void*>(_arr);
return _out;
}
void QWebEngineClientCertificateStore_Remove(QWebEngineClientCertificateStore* self, QSslCertificate* certificate) {
self->remove(*certificate);
}
void QWebEngineClientCertificateStore_Clear(QWebEngineClientCertificateStore* self) {
self->clear();
}

View File

@ -0,0 +1,75 @@
package webengine
/*
#include "gen_qwebengineclientcertificatestore.h"
#include <stdlib.h>
*/
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)
}

View File

@ -0,0 +1,36 @@
#pragma once
#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINECLIENTCERTIFICATESTORE_H
#define MIQT_QT_WEBENGINE_GEN_QWEBENGINECLIENTCERTIFICATESTORE_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#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

View File

@ -0,0 +1,121 @@
#include <QList>
#include <QPoint>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QUrl>
#include <QWebEngineContextMenuData>
#include <qwebenginecontextmenudata.h>
#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<char*>(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<char*>(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<int>(_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<char*>(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<struct miqt_string*>(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<char*>(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<void*>(_arr);
return _out;
}
int QWebEngineContextMenuData_MediaFlags(const QWebEngineContextMenuData* self) {
QWebEngineContextMenuData::MediaFlags _ret = self->mediaFlags();
return static_cast<int>(_ret);
}
int QWebEngineContextMenuData_EditFlags(const QWebEngineContextMenuData* self) {
QWebEngineContextMenuData::EditFlags _ret = self->editFlags();
return static_cast<int>(_ret);
}
void QWebEngineContextMenuData_Delete(QWebEngineContextMenuData* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QWebEngineContextMenuData*>( self );
} else {
delete self;
}
}

View File

@ -0,0 +1,205 @@
package webengine
/*
#include "gen_qwebenginecontextmenudata.h"
#include <stdlib.h>
*/
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)
})
}

View File

@ -0,0 +1,48 @@
#pragma once
#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINECONTEXTMENUDATA_H
#define MIQT_QT_WEBENGINE_GEN_QWEBENGINECONTEXTMENUDATA_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#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

View File

@ -0,0 +1,166 @@
#include <QMetaObject>
#include <QNetworkCookie>
#include <QObject>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QUrl>
#include <QWebEngineCookieStore>
#define WORKAROUND_INNER_CLASS_DEFINITION_QWebEngineCookieStore__FilterRequest
#include <qwebenginecookiestore.h>
#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<char*>(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<char*>(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<void (QWebEngineCookieStore::*)(const QNetworkCookie&)>(&QWebEngineCookieStore::cookieAdded), self, [=](const QNetworkCookie& cookie) {
const QNetworkCookie& cookie_ret = cookie;
// Cast returned reference into pointer
QNetworkCookie* sigval1 = const_cast<QNetworkCookie*>(&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<void (QWebEngineCookieStore::*)(const QNetworkCookie&)>(&QWebEngineCookieStore::cookieRemoved), self, [=](const QNetworkCookie& cookie) {
const QNetworkCookie& cookie_ret = cookie;
// Cast returned reference into pointer
QNetworkCookie* sigval1 = const_cast<QNetworkCookie*>(&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<char*>(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<int>(n));
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
struct miqt_string 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<char*>(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<int>(n));
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
void 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<QWebEngineCookieStore*>( 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<QWebEngineCookieStore::FilterRequest*>( self );
} else {
delete self;
}
}

View File

@ -0,0 +1,274 @@
package webengine
/*
#include "gen_qwebenginecookiestore.h"
#include <stdlib.h>
*/
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)
})
}

View File

@ -0,0 +1,66 @@
#pragma once
#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINECOOKIESTORE_H
#define MIQT_QT_WEBENGINE_GEN_QWEBENGINECOOKIESTORE_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#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

View File

@ -0,0 +1,297 @@
#include <QMetaObject>
#include <QObject>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QUrl>
#include <QWebEngineDownloadItem>
#include <QWebEnginePage>
#include <qwebenginedownloaditem.h>
#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<char*>(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<char*>(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<unsigned int>(_ret);
}
int QWebEngineDownloadItem_State(const QWebEngineDownloadItem* self) {
QWebEngineDownloadItem::DownloadState _ret = self->state();
return static_cast<int>(_ret);
}
long long QWebEngineDownloadItem_TotalBytes(const QWebEngineDownloadItem* self) {
qint64 _ret = self->totalBytes();
return static_cast<long long>(_ret);
}
long long QWebEngineDownloadItem_ReceivedBytes(const QWebEngineDownloadItem* self) {
qint64 _ret = self->receivedBytes();
return static_cast<long long>(_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<char*>(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<char*>(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<int>(_ret);
}
void QWebEngineDownloadItem_SetSavePageFormat(QWebEngineDownloadItem* self, int format) {
self->setSavePageFormat(static_cast<QWebEngineDownloadItem::SavePageFormat>(format));
}
int QWebEngineDownloadItem_Type(const QWebEngineDownloadItem* self) {
QWebEngineDownloadItem::DownloadType _ret = self->type();
return static_cast<int>(_ret);
}
int QWebEngineDownloadItem_InterruptReason(const QWebEngineDownloadItem* self) {
QWebEngineDownloadItem::DownloadInterruptReason _ret = self->interruptReason();
return static_cast<int>(_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<char*>(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<char*>(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<char*>(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<char*>(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<void (QWebEngineDownloadItem::*)()>(&QWebEngineDownloadItem::finished), self, [=]() {
miqt_exec_callback_QWebEngineDownloadItem_Finished(slot);
});
}
void QWebEngineDownloadItem_StateChanged(QWebEngineDownloadItem* self, int state) {
self->stateChanged(static_cast<QWebEngineDownloadItem::DownloadState>(state));
}
void QWebEngineDownloadItem_connect_StateChanged(QWebEngineDownloadItem* self, intptr_t slot) {
QWebEngineDownloadItem::connect(self, static_cast<void (QWebEngineDownloadItem::*)(QWebEngineDownloadItem::DownloadState)>(&QWebEngineDownloadItem::stateChanged), self, [=](QWebEngineDownloadItem::DownloadState state) {
QWebEngineDownloadItem::DownloadState state_ret = state;
int sigval1 = static_cast<int>(state_ret);
miqt_exec_callback_QWebEngineDownloadItem_StateChanged(slot, sigval1);
});
}
void QWebEngineDownloadItem_DownloadProgress(QWebEngineDownloadItem* self, long long bytesReceived, long long bytesTotal) {
self->downloadProgress(static_cast<qint64>(bytesReceived), static_cast<qint64>(bytesTotal));
}
void QWebEngineDownloadItem_connect_DownloadProgress(QWebEngineDownloadItem* self, intptr_t slot) {
QWebEngineDownloadItem::connect(self, static_cast<void (QWebEngineDownloadItem::*)(qint64, qint64)>(&QWebEngineDownloadItem::downloadProgress), self, [=](qint64 bytesReceived, qint64 bytesTotal) {
qint64 bytesReceived_ret = bytesReceived;
long long sigval1 = static_cast<long long>(bytesReceived_ret);
qint64 bytesTotal_ret = bytesTotal;
long long sigval2 = static_cast<long long>(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<void (QWebEngineDownloadItem::*)(bool)>(&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<char*>(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<int>(n));
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
struct miqt_string 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<char*>(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<int>(n));
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
void QWebEngineDownloadItem_Delete(QWebEngineDownloadItem* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QWebEngineDownloadItem*>( self );
} else {
delete self;
}
}

View File

@ -0,0 +1,414 @@
package webengine
/*
#include "gen_qwebenginedownloaditem.h"
#include <stdlib.h>
*/
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)
})
}

View File

@ -0,0 +1,79 @@
#pragma once
#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINEDOWNLOADITEM_H
#define MIQT_QT_WEBENGINE_GEN_QWEBENGINEDOWNLOADITEM_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#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

View File

@ -0,0 +1,35 @@
#include <QWebEngineFindTextResult>
#include <qwebenginefindtextresult.h>
#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<QWebEngineFindTextResult*>( self );
} else {
delete self;
}
}

View File

@ -0,0 +1,96 @@
package webengine
/*
#include "gen_qwebenginefindtextresult.h"
#include <stdlib.h>
*/
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)
})
}

View File

@ -0,0 +1,34 @@
#pragma once
#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINEFINDTEXTRESULT_H
#define MIQT_QT_WEBENGINE_GEN_QWEBENGINEFINDTEXTRESULT_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#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

View File

@ -0,0 +1,37 @@
#include <QUrl>
#include <QWebEngineFullScreenRequest>
#include <qwebenginefullscreenrequest.h>
#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<QUrl*>(&_ret);
}
void QWebEngineFullScreenRequest_Delete(QWebEngineFullScreenRequest* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QWebEngineFullScreenRequest*>( self );
} else {
delete self;
}
}

View File

@ -0,0 +1,91 @@
package webengine
/*
#include "gen_qwebenginefullscreenrequest.h"
#include <stdlib.h>
*/
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)
})
}

View File

@ -0,0 +1,36 @@
#pragma once
#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINEFULLSCREENREQUEST_H
#define MIQT_QT_WEBENGINE_GEN_QWEBENGINEFULLSCREENREQUEST_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#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

View File

@ -0,0 +1,151 @@
#include <QDateTime>
#include <QList>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QUrl>
#include <QWebEngineHistory>
#include <QWebEngineHistoryItem>
#include <qwebenginehistory.h>
#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<char*>(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<QWebEngineHistoryItem*>( self );
} else {
delete self;
}
}
void QWebEngineHistory_Clear(QWebEngineHistory* self) {
self->clear();
}
struct miqt_array /* of QWebEngineHistoryItem* */ QWebEngineHistory_Items(const QWebEngineHistory* self) {
QList<QWebEngineHistoryItem> _ret = self->items();
// Convert QList<> from C++ memory to manually-managed C memory
QWebEngineHistoryItem** _arr = static_cast<QWebEngineHistoryItem**>(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<void*>(_arr);
return _out;
}
struct miqt_array /* of QWebEngineHistoryItem* */ QWebEngineHistory_BackItems(const QWebEngineHistory* self, int maxItems) {
QList<QWebEngineHistoryItem> _ret = self->backItems(static_cast<int>(maxItems));
// Convert QList<> from C++ memory to manually-managed C memory
QWebEngineHistoryItem** _arr = static_cast<QWebEngineHistoryItem**>(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<void*>(_arr);
return _out;
}
struct miqt_array /* of QWebEngineHistoryItem* */ QWebEngineHistory_ForwardItems(const QWebEngineHistory* self, int maxItems) {
QList<QWebEngineHistoryItem> _ret = self->forwardItems(static_cast<int>(maxItems));
// Convert QList<> from C++ memory to manually-managed C memory
QWebEngineHistoryItem** _arr = static_cast<QWebEngineHistoryItem**>(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<void*>(_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<int>(i)));
}
int QWebEngineHistory_CurrentItemIndex(const QWebEngineHistory* self) {
return self->currentItemIndex();
}
int QWebEngineHistory_Count(const QWebEngineHistory* self) {
return self->count();
}

View File

@ -0,0 +1,257 @@
package webengine
/*
#include "gen_qwebenginehistory.h"
#include <stdlib.h>
*/
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))
}

View File

@ -0,0 +1,60 @@
#pragma once
#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINEHISTORY_H
#define MIQT_QT_WEBENGINE_GEN_QWEBENGINEHISTORY_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#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

View File

@ -0,0 +1,143 @@
#include <QByteArray>
#include <QList>
#include <QMap>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QUrl>
#include <QWebEngineHttpRequest>
#include <qwebenginehttprequest.h>
#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<QString, QString> postData_QMap;
struct miqt_string* postData_karr = static_cast<struct miqt_string*>(postData.keys);
struct miqt_string* postData_varr = static_cast<struct miqt_string*>(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<int>(_ret);
}
void QWebEngineHttpRequest_SetMethod(QWebEngineHttpRequest* self, int method) {
self->setMethod(static_cast<QWebEngineHttpRequest::Method>(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<char*>(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<QByteArray> _ret = self->headers();
// Convert QList<> from C++ memory to manually-managed C memory
struct miqt_string* _arr = static_cast<struct miqt_string*>(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<char*>(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<void*>(_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<char*>(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<QWebEngineHttpRequest*>( self );
} else {
delete self;
}
}

View File

@ -0,0 +1,238 @@
package webengine
/*
#include "gen_qwebenginehttprequest.h"
#include <stdlib.h>
*/
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)
})
}

View File

@ -0,0 +1,51 @@
#pragma once
#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINEHTTPREQUEST_H
#define MIQT_QT_WEBENGINE_GEN_QWEBENGINEHTTPREQUEST_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#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

View File

@ -0,0 +1,177 @@
#include <QImage>
#include <QMetaObject>
#include <QObject>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QUrl>
#include <QWebEngineNotification>
#include <qwebenginenotification.h>
#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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<int>(_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<void (QWebEngineNotification::*)()>(&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<char*>(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<int>(n));
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
struct miqt_string 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<char*>(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<int>(n));
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
void QWebEngineNotification_Delete(QWebEngineNotification* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QWebEngineNotification*>( self );
} else {
delete self;
}
}

View File

@ -0,0 +1,220 @@
package webengine
/*
#include "gen_qwebenginenotification.h"
#include <stdlib.h>
*/
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)
})
}

View File

@ -0,0 +1,58 @@
#pragma once
#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINENOTIFICATION_H
#define MIQT_QT_WEBENGINE_GEN_QWEBENGINENOTIFICATION_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,263 @@
#pragma once
#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINEPAGE_H
#define MIQT_QT_WEBENGINE_GEN_QWEBENGINEPAGE_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#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

View File

@ -0,0 +1,627 @@
#include <QByteArray>
#include <QChildEvent>
#include <QEvent>
#include <QList>
#include <QMetaMethod>
#include <QMetaObject>
#include <QObject>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QTimerEvent>
#include <QUrl>
#include <QWebEngineClientCertificateStore>
#include <QWebEngineCookieStore>
#include <QWebEngineDownloadItem>
#include <QWebEngineProfile>
#include <QWebEngineScriptCollection>
#include <QWebEngineSettings>
#include <QWebEngineUrlRequestInterceptor>
#include <QWebEngineUrlSchemeHandler>
#include <qwebengineprofile.h>
#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<QMetaMethod*>(&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<QMetaMethod*>(&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<QObject*>(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<QObject*>(ret);
}
void QWebEngineProfile_new3(QObject* parent, QWebEngineProfile** outptr_QWebEngineProfile, QObject** outptr_QObject) {
MiqtVirtualQWebEngineProfile* ret = new MiqtVirtualQWebEngineProfile(parent);
*outptr_QWebEngineProfile = ret;
*outptr_QObject = static_cast<QObject*>(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<QObject*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<int>(_ret);
}
void QWebEngineProfile_SetHttpCacheType(QWebEngineProfile* self, int httpCacheType) {
self->setHttpCacheType(static_cast<QWebEngineProfile::HttpCacheType>(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<char*>(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<int>(_ret);
}
void QWebEngineProfile_SetPersistentCookiesPolicy(QWebEngineProfile* self, int persistentCookiesPolicy) {
self->setPersistentCookiesPolicy(static_cast<QWebEngineProfile::PersistentCookiesPolicy>(persistentCookiesPolicy));
}
int QWebEngineProfile_HttpCacheMaximumSize(const QWebEngineProfile* self) {
return self->httpCacheMaximumSize();
}
void QWebEngineProfile_SetHttpCacheMaximumSize(QWebEngineProfile* self, int maxSize) {
self->setHttpCacheMaximumSize(static_cast<int>(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<QUrl> urls_QList;
urls_QList.reserve(urls.len);
QUrl** urls_arr = static_cast<QUrl**>(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<struct miqt_string*>(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<struct miqt_string*>(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<char*>(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<void*>(_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<char*>(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<void (QWebEngineProfile::*)(QWebEngineDownloadItem*)>(&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<char*>(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<int>(n));
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
struct miqt_string 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<char*>(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<int>(n));
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
void QWebEngineProfile_SetUseForGlobalCertificateVerification1(QWebEngineProfile* self, bool enabled) {
self->setUseForGlobalCertificateVerification(enabled);
}
void QWebEngineProfile_override_virtual_Event(void* self, intptr_t slot) {
dynamic_cast<MiqtVirtualQWebEngineProfile*>( (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<MiqtVirtualQWebEngineProfile*>( (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<MiqtVirtualQWebEngineProfile*>( (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<MiqtVirtualQWebEngineProfile*>( (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<MiqtVirtualQWebEngineProfile*>( (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<MiqtVirtualQWebEngineProfile*>( (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<MiqtVirtualQWebEngineProfile*>( (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<MiqtVirtualQWebEngineProfile*>( self );
} else {
delete self;
}
}

View File

@ -0,0 +1,631 @@
package webengine
/*
#include "gen_qwebengineprofile.h"
#include <stdlib.h>
*/
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(&param1[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)
})
}

View File

@ -0,0 +1,126 @@
#pragma once
#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINEPROFILE_H
#define MIQT_QT_WEBENGINE_GEN_QWEBENGINEPROFILE_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#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

View File

@ -0,0 +1,49 @@
#include <QUrl>
#include <QWebEngineQuotaRequest>
#include <qwebenginequotarequest.h>
#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<long long>(_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<QWebEngineQuotaRequest*>( self );
} else {
delete self;
}
}

View File

@ -0,0 +1,112 @@
package webengine
/*
#include "gen_qwebenginequotarequest.h"
#include <stdlib.h>
*/
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)
})
}

View File

@ -0,0 +1,39 @@
#pragma once
#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINEQUOTAREQUEST_H
#define MIQT_QT_WEBENGINE_GEN_QWEBENGINEQUOTAREQUEST_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#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

View File

@ -0,0 +1,58 @@
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QUrl>
#include <QWebEngineRegisterProtocolHandlerRequest>
#include <qwebengineregisterprotocolhandlerrequest.h>
#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<char*>(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<QWebEngineRegisterProtocolHandlerRequest*>( self );
} else {
delete self;
}
}

View File

@ -0,0 +1,115 @@
package webengine
/*
#include "gen_qwebengineregisterprotocolhandlerrequest.h"
#include <stdlib.h>
*/
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)
})
}

View File

@ -0,0 +1,39 @@
#pragma once
#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINEREGISTERPROTOCOLHANDLERREQUEST_H
#define MIQT_QT_WEBENGINE_GEN_QWEBENGINEREGISTERPROTOCOLHANDLERREQUEST_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#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

View File

@ -0,0 +1,104 @@
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QWebEngineScript>
#include <qwebenginescript.h>
#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<char*>(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<char*>(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<int>(_ret);
}
void QWebEngineScript_SetInjectionPoint(QWebEngineScript* self, int injectionPoint) {
self->setInjectionPoint(static_cast<QWebEngineScript::InjectionPoint>(injectionPoint));
}
unsigned int QWebEngineScript_WorldId(const QWebEngineScript* self) {
quint32 _ret = self->worldId();
return static_cast<unsigned int>(_ret);
}
void QWebEngineScript_SetWorldId(QWebEngineScript* self, unsigned int worldId) {
self->setWorldId(static_cast<quint32>(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<QWebEngineScript*>( self );
} else {
delete self;
}
}

View File

@ -0,0 +1,174 @@
package webengine
/*
#include "gen_qwebenginescript.h"
#include <stdlib.h>
*/
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)
})
}

View File

@ -0,0 +1,46 @@
#pragma once
#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINESCRIPT_H
#define MIQT_QT_WEBENGINE_GEN_QWEBENGINESCRIPT_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#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

View File

@ -0,0 +1,88 @@
#include <QList>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QWebEngineScript>
#include <QWebEngineScriptCollection>
#include <qwebenginescriptcollection.h>
#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<QWebEngineScript> _ret = self->findScripts(name_QString);
// Convert QList<> from C++ memory to manually-managed C memory
QWebEngineScript** _arr = static_cast<QWebEngineScript**>(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<void*>(_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<QWebEngineScript> list_QList;
list_QList.reserve(list.len);
QWebEngineScript** list_arr = static_cast<QWebEngineScript**>(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<QWebEngineScript> _ret = self->toList();
// Convert QList<> from C++ memory to manually-managed C memory
QWebEngineScript** _arr = static_cast<QWebEngineScript**>(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<void*>(_arr);
return _out;
}
void QWebEngineScriptCollection_Delete(QWebEngineScriptCollection* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QWebEngineScriptCollection*>( self );
} else {
delete self;
}
}

View File

@ -0,0 +1,143 @@
package webengine
/*
#include "gen_qwebenginescriptcollection.h"
#include <stdlib.h>
*/
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)
})
}

View File

@ -0,0 +1,42 @@
#pragma once
#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINESCRIPTCOLLECTION_H
#define MIQT_QT_WEBENGINE_GEN_QWEBENGINESCRIPTCOLLECTION_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#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

View File

@ -0,0 +1,89 @@
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QWebEngineSettings>
#include <qwebenginesettings.h>
#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<QWebEngineSettings::FontFamily>(which), family_QString);
}
struct miqt_string QWebEngineSettings_FontFamily(const QWebEngineSettings* self, int which) {
QString _ret = self->fontFamily(static_cast<QWebEngineSettings::FontFamily>(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<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
void QWebEngineSettings_ResetFontFamily(QWebEngineSettings* self, int which) {
self->resetFontFamily(static_cast<QWebEngineSettings::FontFamily>(which));
}
void QWebEngineSettings_SetFontSize(QWebEngineSettings* self, int typeVal, int size) {
self->setFontSize(static_cast<QWebEngineSettings::FontSize>(typeVal), static_cast<int>(size));
}
int QWebEngineSettings_FontSize(const QWebEngineSettings* self, int typeVal) {
return self->fontSize(static_cast<QWebEngineSettings::FontSize>(typeVal));
}
void QWebEngineSettings_ResetFontSize(QWebEngineSettings* self, int typeVal) {
self->resetFontSize(static_cast<QWebEngineSettings::FontSize>(typeVal));
}
void QWebEngineSettings_SetAttribute(QWebEngineSettings* self, int attr, bool on) {
self->setAttribute(static_cast<QWebEngineSettings::WebAttribute>(attr), on);
}
bool QWebEngineSettings_TestAttribute(const QWebEngineSettings* self, int attr) {
return self->testAttribute(static_cast<QWebEngineSettings::WebAttribute>(attr));
}
void QWebEngineSettings_ResetAttribute(QWebEngineSettings* self, int attr) {
self->resetAttribute(static_cast<QWebEngineSettings::WebAttribute>(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<char*>(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<int>(_ret);
}
void QWebEngineSettings_SetUnknownUrlSchemePolicy(QWebEngineSettings* self, int policy) {
self->setUnknownUrlSchemePolicy(static_cast<QWebEngineSettings::UnknownUrlSchemePolicy>(policy));
}
void QWebEngineSettings_ResetUnknownUrlSchemePolicy(QWebEngineSettings* self) {
self->resetUnknownUrlSchemePolicy();
}

View File

@ -0,0 +1,192 @@
package webengine
/*
#include "gen_qwebenginesettings.h"
#include <stdlib.h>
*/
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)
}

View File

@ -0,0 +1,44 @@
#pragma once
#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINESETTINGS_H
#define MIQT_QT_WEBENGINE_GEN_QWEBENGINESETTINGS_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#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

View File

@ -0,0 +1,56 @@
#include <QByteArray>
#include <QUrl>
#include <QWebEngineUrlRequestInfo>
#include <qwebengineurlrequestinfo.h>
#include "gen_qwebengineurlrequestinfo.h"
#include "_cgo_export.h"
int QWebEngineUrlRequestInfo_ResourceType(const QWebEngineUrlRequestInfo* self) {
QWebEngineUrlRequestInfo::ResourceType _ret = self->resourceType();
return static_cast<int>(_ret);
}
int QWebEngineUrlRequestInfo_NavigationType(const QWebEngineUrlRequestInfo* self) {
QWebEngineUrlRequestInfo::NavigationType _ret = self->navigationType();
return static_cast<int>(_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<char*>(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);
}

View File

@ -0,0 +1,147 @@
package webengine
/*
#include "gen_qwebengineurlrequestinfo.h"
#include <stdlib.h>
*/
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)
}

View File

@ -0,0 +1,40 @@
#pragma once
#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINEURLREQUESTINFO_H
#define MIQT_QT_WEBENGINE_GEN_QWEBENGINEURLREQUESTINFO_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#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

View File

@ -0,0 +1,372 @@
#include <QChildEvent>
#include <QEvent>
#include <QMetaMethod>
#include <QMetaObject>
#include <QObject>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QTimerEvent>
#include <QWebEngineUrlRequestInfo>
#include <QWebEngineUrlRequestInterceptor>
#include <qwebengineurlrequestinterceptor.h>
#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<QMetaMethod*>(&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<QMetaMethod*>(&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<QObject*>(ret);
}
void QWebEngineUrlRequestInterceptor_new2(QObject* p, QWebEngineUrlRequestInterceptor** outptr_QWebEngineUrlRequestInterceptor, QObject** outptr_QObject) {
MiqtVirtualQWebEngineUrlRequestInterceptor* ret = new MiqtVirtualQWebEngineUrlRequestInterceptor(p);
*outptr_QWebEngineUrlRequestInterceptor = ret;
*outptr_QObject = static_cast<QObject*>(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<char*>(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<char*>(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<char*>(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<int>(n));
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
struct miqt_string 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<char*>(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<int>(n));
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
void QWebEngineUrlRequestInterceptor_override_virtual_InterceptRequest(void* self, intptr_t slot) {
dynamic_cast<MiqtVirtualQWebEngineUrlRequestInterceptor*>( (QWebEngineUrlRequestInterceptor*)(self) )->handle__InterceptRequest = slot;
}
void QWebEngineUrlRequestInterceptor_override_virtual_Event(void* self, intptr_t slot) {
dynamic_cast<MiqtVirtualQWebEngineUrlRequestInterceptor*>( (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<MiqtVirtualQWebEngineUrlRequestInterceptor*>( (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<MiqtVirtualQWebEngineUrlRequestInterceptor*>( (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<MiqtVirtualQWebEngineUrlRequestInterceptor*>( (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<MiqtVirtualQWebEngineUrlRequestInterceptor*>( (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<MiqtVirtualQWebEngineUrlRequestInterceptor*>( (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<MiqtVirtualQWebEngineUrlRequestInterceptor*>( (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<MiqtVirtualQWebEngineUrlRequestInterceptor*>( self );
} else {
delete self;
}
}

View File

@ -0,0 +1,350 @@
package webengine
/*
#include "gen_qwebengineurlrequestinterceptor.h"
#include <stdlib.h>
*/
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)
})
}

View File

@ -0,0 +1,70 @@
#pragma once
#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINEURLREQUESTINTERCEPTOR_H
#define MIQT_QT_WEBENGINE_GEN_QWEBENGINEURLREQUESTINTERCEPTOR_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#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

View File

@ -0,0 +1,125 @@
#include <QByteArray>
#include <QIODevice>
#include <QMetaObject>
#include <QObject>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QUrl>
#include <QWebEngineUrlRequestJob>
#include <qwebengineurlrequestjob.h>
#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<char*>(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<char*>(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<char*>(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<QWebEngineUrlRequestJob::Error>(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<char*>(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<int>(n));
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
struct miqt_string 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<char*>(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<int>(n));
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
void QWebEngineUrlRequestJob_Delete(QWebEngineUrlRequestJob* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QWebEngineUrlRequestJob*>( self );
} else {
delete self;
}
}

View File

@ -0,0 +1,187 @@
package webengine
/*
#include "gen_qwebengineurlrequestjob.h"
#include <stdlib.h>
*/
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)
})
}

View File

@ -0,0 +1,51 @@
#pragma once
#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINEURLREQUESTJOB_H
#define MIQT_QT_WEBENGINE_GEN_QWEBENGINEURLREQUESTJOB_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#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

View File

@ -0,0 +1,91 @@
#include <QByteArray>
#include <QWebEngineUrlScheme>
#include <qwebengineurlscheme.h>
#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<char*>(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<int>(_ret);
}
void QWebEngineUrlScheme_SetSyntax(QWebEngineUrlScheme* self, int newValue) {
self->setSyntax(static_cast<QWebEngineUrlScheme::Syntax>(newValue));
}
int QWebEngineUrlScheme_DefaultPort(const QWebEngineUrlScheme* self) {
return self->defaultPort();
}
void QWebEngineUrlScheme_SetDefaultPort(QWebEngineUrlScheme* self, int newValue) {
self->setDefaultPort(static_cast<int>(newValue));
}
int QWebEngineUrlScheme_Flags(const QWebEngineUrlScheme* self) {
QWebEngineUrlScheme::Flags _ret = self->flags();
return static_cast<int>(_ret);
}
void QWebEngineUrlScheme_SetFlags(QWebEngineUrlScheme* self, int newValue) {
self->setFlags(static_cast<QWebEngineUrlScheme::Flags>(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<QWebEngineUrlScheme*>( self );
} else {
delete self;
}
}

View File

@ -0,0 +1,189 @@
package webengine
/*
#include "gen_qwebengineurlscheme.h"
#include <stdlib.h>
*/
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)
})
}

View File

@ -0,0 +1,45 @@
#pragma once
#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINEURLSCHEME_H
#define MIQT_QT_WEBENGINE_GEN_QWEBENGINEURLSCHEME_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#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

View File

@ -0,0 +1,370 @@
#include <QChildEvent>
#include <QEvent>
#include <QMetaMethod>
#include <QMetaObject>
#include <QObject>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QTimerEvent>
#include <QWebEngineUrlRequestJob>
#include <QWebEngineUrlSchemeHandler>
#include <qwebengineurlschemehandler.h>
#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<QMetaMethod*>(&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<QMetaMethod*>(&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<QObject*>(ret);
}
void QWebEngineUrlSchemeHandler_new2(QObject* parent, QWebEngineUrlSchemeHandler** outptr_QWebEngineUrlSchemeHandler, QObject** outptr_QObject) {
MiqtVirtualQWebEngineUrlSchemeHandler* ret = new MiqtVirtualQWebEngineUrlSchemeHandler(parent);
*outptr_QWebEngineUrlSchemeHandler = ret;
*outptr_QObject = static_cast<QObject*>(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<char*>(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<char*>(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<char*>(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<int>(n));
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
struct miqt_string 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<char*>(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<int>(n));
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
void QWebEngineUrlSchemeHandler_override_virtual_RequestStarted(void* self, intptr_t slot) {
dynamic_cast<MiqtVirtualQWebEngineUrlSchemeHandler*>( (QWebEngineUrlSchemeHandler*)(self) )->handle__RequestStarted = slot;
}
void QWebEngineUrlSchemeHandler_override_virtual_Event(void* self, intptr_t slot) {
dynamic_cast<MiqtVirtualQWebEngineUrlSchemeHandler*>( (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<MiqtVirtualQWebEngineUrlSchemeHandler*>( (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<MiqtVirtualQWebEngineUrlSchemeHandler*>( (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<MiqtVirtualQWebEngineUrlSchemeHandler*>( (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<MiqtVirtualQWebEngineUrlSchemeHandler*>( (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<MiqtVirtualQWebEngineUrlSchemeHandler*>( (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<MiqtVirtualQWebEngineUrlSchemeHandler*>( (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<MiqtVirtualQWebEngineUrlSchemeHandler*>( self );
} else {
delete self;
}
}

View File

@ -0,0 +1,350 @@
package webengine
/*
#include "gen_qwebengineurlschemehandler.h"
#include <stdlib.h>
*/
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)
})
}

View File

@ -0,0 +1,70 @@
#pragma once
#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINEURLSCHEMEHANDLER_H
#define MIQT_QT_WEBENGINE_GEN_QWEBENGINEURLSCHEMEHANDLER_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,251 @@
#pragma once
#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINEVIEW_H
#define MIQT_QT_WEBENGINE_GEN_QWEBENGINEVIEW_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#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

View File

@ -1,4 +1,4 @@
package qt6
package network
/*
#cgo pkg-config: Qt6Network

View File

@ -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 {

6
qt6/webchannel/cflags.go Normal file
View File

@ -0,0 +1,6 @@
package webchannel
/*
#cgo pkg-config: Qt6WebChannel
*/
import "C"

View File

@ -0,0 +1,95 @@
#include <QMap>
#include <QMetaObject>
#include <QObject>
#include <QQmlWebChannel>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QVariant>
#include <QWebChannel>
#include <qqmlwebchannel.h>
#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<QWebChannel*>(ret);
*outptr_QObject = static_cast<QObject*>(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<QWebChannel*>(ret);
*outptr_QObject = static_cast<QObject*>(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<char*>(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<struct miqt_string*>(objects.keys);
QVariant** objects_varr = static_cast<QVariant**>(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<char*>(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<int>(n));
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
void QQmlWebChannel_Delete(QQmlWebChannel* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QQmlWebChannel*>( self );
} else {
delete self;
}
}

View File

@ -0,0 +1,164 @@
package webchannel
/*
#include "gen_qqmlwebchannel.h"
#include <stdlib.h>
*/
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)
})
}

View File

@ -0,0 +1,47 @@
#pragma once
#ifndef MIQT_QT6_WEBCHANNEL_GEN_QQMLWEBCHANNEL_H
#define MIQT_QT6_WEBCHANNEL_GEN_QQMLWEBCHANNEL_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#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

Some files were not shown because too many files have changed in this diff Show More