webkit: initial generation

This commit is contained in:
mappu 2024-11-26 22:31:32 +13:00
parent db5fadaeb7
commit 2c067edda5
44 changed files with 25188 additions and 0 deletions

3
qt/webkit/binding.go Normal file
View File

@ -0,0 +1,3 @@
package webkit
type QWebPluginFactory__Extension int

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

@ -0,0 +1,6 @@
package webkit
/*
#cgo pkg-config: Qt5WebKitWidgets Qt5PrintSupport
*/
import "C"

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,282 @@
#pragma once
#ifndef MIQT_QT_WEBKIT_GEN_QGRAPHICSWEBVIEW_H
#define MIQT_QT_WEBKIT_GEN_QGRAPHICSWEBVIEW_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 QCloseEvent;
class QEvent;
class QFocusEvent;
class QGraphicsItem;
class QGraphicsLayoutItem;
class QGraphicsObject;
class QGraphicsSceneContextMenuEvent;
class QGraphicsSceneDragDropEvent;
class QGraphicsSceneHoverEvent;
class QGraphicsSceneMouseEvent;
class QGraphicsSceneMoveEvent;
class QGraphicsSceneResizeEvent;
class QGraphicsSceneWheelEvent;
class QGraphicsWebView;
class QGraphicsWidget;
class QHideEvent;
class QIcon;
class QInputMethodEvent;
class QKeyEvent;
class QMetaObject;
class QNetworkRequest;
class QObject;
class QPainter;
class QPainterPath;
class QPointF;
class QRectF;
class QShowEvent;
class QSizeF;
class QStyleOption;
class QStyleOptionGraphicsItem;
class QUrl;
class QVariant;
class QWebHistory;
class QWebPage;
class QWebSettings;
class QWidget;
#else
typedef struct QAction QAction;
typedef struct QCloseEvent QCloseEvent;
typedef struct QEvent QEvent;
typedef struct QFocusEvent QFocusEvent;
typedef struct QGraphicsItem QGraphicsItem;
typedef struct QGraphicsLayoutItem QGraphicsLayoutItem;
typedef struct QGraphicsObject QGraphicsObject;
typedef struct QGraphicsSceneContextMenuEvent QGraphicsSceneContextMenuEvent;
typedef struct QGraphicsSceneDragDropEvent QGraphicsSceneDragDropEvent;
typedef struct QGraphicsSceneHoverEvent QGraphicsSceneHoverEvent;
typedef struct QGraphicsSceneMouseEvent QGraphicsSceneMouseEvent;
typedef struct QGraphicsSceneMoveEvent QGraphicsSceneMoveEvent;
typedef struct QGraphicsSceneResizeEvent QGraphicsSceneResizeEvent;
typedef struct QGraphicsSceneWheelEvent QGraphicsSceneWheelEvent;
typedef struct QGraphicsWebView QGraphicsWebView;
typedef struct QGraphicsWidget QGraphicsWidget;
typedef struct QHideEvent QHideEvent;
typedef struct QIcon QIcon;
typedef struct QInputMethodEvent QInputMethodEvent;
typedef struct QKeyEvent QKeyEvent;
typedef struct QMetaObject QMetaObject;
typedef struct QNetworkRequest QNetworkRequest;
typedef struct QObject QObject;
typedef struct QPainter QPainter;
typedef struct QPainterPath QPainterPath;
typedef struct QPointF QPointF;
typedef struct QRectF QRectF;
typedef struct QShowEvent QShowEvent;
typedef struct QSizeF QSizeF;
typedef struct QStyleOption QStyleOption;
typedef struct QStyleOptionGraphicsItem QStyleOptionGraphicsItem;
typedef struct QUrl QUrl;
typedef struct QVariant QVariant;
typedef struct QWebHistory QWebHistory;
typedef struct QWebPage QWebPage;
typedef struct QWebSettings QWebSettings;
typedef struct QWidget QWidget;
#endif
void QGraphicsWebView_new(QGraphicsWebView** outptr_QGraphicsWebView, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem);
void QGraphicsWebView_new2(QGraphicsItem* parent, QGraphicsWebView** outptr_QGraphicsWebView, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem);
QMetaObject* QGraphicsWebView_MetaObject(const QGraphicsWebView* self);
void* QGraphicsWebView_Metacast(QGraphicsWebView* self, const char* param1);
struct miqt_string QGraphicsWebView_Tr(const char* s);
struct miqt_string QGraphicsWebView_TrUtf8(const char* s);
QWebPage* QGraphicsWebView_Page(const QGraphicsWebView* self);
void QGraphicsWebView_SetPage(QGraphicsWebView* self, QWebPage* page);
QUrl* QGraphicsWebView_Url(const QGraphicsWebView* self);
void QGraphicsWebView_SetUrl(QGraphicsWebView* self, QUrl* url);
struct miqt_string QGraphicsWebView_Title(const QGraphicsWebView* self);
QIcon* QGraphicsWebView_Icon(const QGraphicsWebView* self);
double QGraphicsWebView_ZoomFactor(const QGraphicsWebView* self);
void QGraphicsWebView_SetZoomFactor(QGraphicsWebView* self, double zoomFactor);
bool QGraphicsWebView_IsModified(const QGraphicsWebView* self);
void QGraphicsWebView_Load(QGraphicsWebView* self, QUrl* url);
void QGraphicsWebView_LoadWithRequest(QGraphicsWebView* self, QNetworkRequest* request);
void QGraphicsWebView_SetHtml(QGraphicsWebView* self, struct miqt_string html);
void QGraphicsWebView_SetContent(QGraphicsWebView* self, struct miqt_string data);
QWebHistory* QGraphicsWebView_History(const QGraphicsWebView* self);
QWebSettings* QGraphicsWebView_Settings(const QGraphicsWebView* self);
QAction* QGraphicsWebView_PageAction(const QGraphicsWebView* self, int action);
void QGraphicsWebView_TriggerPageAction(QGraphicsWebView* self, int action);
bool QGraphicsWebView_FindText(QGraphicsWebView* self, struct miqt_string subString);
bool QGraphicsWebView_ResizesToContents(const QGraphicsWebView* self);
void QGraphicsWebView_SetResizesToContents(QGraphicsWebView* self, bool enabled);
bool QGraphicsWebView_IsTiledBackingStoreFrozen(const QGraphicsWebView* self);
void QGraphicsWebView_SetTiledBackingStoreFrozen(QGraphicsWebView* self, bool frozen);
void QGraphicsWebView_SetGeometry(QGraphicsWebView* self, QRectF* rect);
void QGraphicsWebView_UpdateGeometry(QGraphicsWebView* self);
void QGraphicsWebView_Paint(QGraphicsWebView* self, QPainter* param1, QStyleOptionGraphicsItem* options, QWidget* widget);
QVariant* QGraphicsWebView_ItemChange(QGraphicsWebView* self, int change, QVariant* value);
bool QGraphicsWebView_Event(QGraphicsWebView* self, QEvent* param1);
QSizeF* QGraphicsWebView_SizeHint(const QGraphicsWebView* self, int which, QSizeF* constraint);
QVariant* QGraphicsWebView_InputMethodQuery(const QGraphicsWebView* self, int query);
int QGraphicsWebView_RenderHints(const QGraphicsWebView* self);
void QGraphicsWebView_SetRenderHints(QGraphicsWebView* self, int renderHints);
void QGraphicsWebView_SetRenderHint(QGraphicsWebView* self, int param1);
void QGraphicsWebView_Stop(QGraphicsWebView* self);
void QGraphicsWebView_Back(QGraphicsWebView* self);
void QGraphicsWebView_Forward(QGraphicsWebView* self);
void QGraphicsWebView_Reload(QGraphicsWebView* self);
void QGraphicsWebView_LoadStarted(QGraphicsWebView* self);
void QGraphicsWebView_connect_LoadStarted(QGraphicsWebView* self, intptr_t slot);
void QGraphicsWebView_LoadFinished(QGraphicsWebView* self, bool param1);
void QGraphicsWebView_connect_LoadFinished(QGraphicsWebView* self, intptr_t slot);
void QGraphicsWebView_LoadProgress(QGraphicsWebView* self, int progress);
void QGraphicsWebView_connect_LoadProgress(QGraphicsWebView* self, intptr_t slot);
void QGraphicsWebView_UrlChanged(QGraphicsWebView* self, QUrl* param1);
void QGraphicsWebView_connect_UrlChanged(QGraphicsWebView* self, intptr_t slot);
void QGraphicsWebView_TitleChanged(QGraphicsWebView* self, struct miqt_string param1);
void QGraphicsWebView_connect_TitleChanged(QGraphicsWebView* self, intptr_t slot);
void QGraphicsWebView_IconChanged(QGraphicsWebView* self);
void QGraphicsWebView_connect_IconChanged(QGraphicsWebView* self, intptr_t slot);
void QGraphicsWebView_StatusBarMessage(QGraphicsWebView* self, struct miqt_string message);
void QGraphicsWebView_connect_StatusBarMessage(QGraphicsWebView* self, intptr_t slot);
void QGraphicsWebView_LinkClicked(QGraphicsWebView* self, QUrl* param1);
void QGraphicsWebView_connect_LinkClicked(QGraphicsWebView* self, intptr_t slot);
void QGraphicsWebView_MousePressEvent(QGraphicsWebView* self, QGraphicsSceneMouseEvent* param1);
void QGraphicsWebView_MouseDoubleClickEvent(QGraphicsWebView* self, QGraphicsSceneMouseEvent* param1);
void QGraphicsWebView_MouseReleaseEvent(QGraphicsWebView* self, QGraphicsSceneMouseEvent* param1);
void QGraphicsWebView_MouseMoveEvent(QGraphicsWebView* self, QGraphicsSceneMouseEvent* param1);
void QGraphicsWebView_HoverMoveEvent(QGraphicsWebView* self, QGraphicsSceneHoverEvent* param1);
void QGraphicsWebView_HoverLeaveEvent(QGraphicsWebView* self, QGraphicsSceneHoverEvent* param1);
void QGraphicsWebView_WheelEvent(QGraphicsWebView* self, QGraphicsSceneWheelEvent* param1);
void QGraphicsWebView_KeyPressEvent(QGraphicsWebView* self, QKeyEvent* param1);
void QGraphicsWebView_KeyReleaseEvent(QGraphicsWebView* self, QKeyEvent* param1);
void QGraphicsWebView_ContextMenuEvent(QGraphicsWebView* self, QGraphicsSceneContextMenuEvent* param1);
void QGraphicsWebView_DragEnterEvent(QGraphicsWebView* self, QGraphicsSceneDragDropEvent* param1);
void QGraphicsWebView_DragLeaveEvent(QGraphicsWebView* self, QGraphicsSceneDragDropEvent* param1);
void QGraphicsWebView_DragMoveEvent(QGraphicsWebView* self, QGraphicsSceneDragDropEvent* param1);
void QGraphicsWebView_DropEvent(QGraphicsWebView* self, QGraphicsSceneDragDropEvent* param1);
void QGraphicsWebView_FocusInEvent(QGraphicsWebView* self, QFocusEvent* param1);
void QGraphicsWebView_FocusOutEvent(QGraphicsWebView* self, QFocusEvent* param1);
void QGraphicsWebView_InputMethodEvent(QGraphicsWebView* self, QInputMethodEvent* param1);
bool QGraphicsWebView_FocusNextPrevChild(QGraphicsWebView* self, bool next);
bool QGraphicsWebView_SceneEvent(QGraphicsWebView* self, QEvent* param1);
struct miqt_string QGraphicsWebView_Tr2(const char* s, const char* c);
struct miqt_string QGraphicsWebView_Tr3(const char* s, const char* c, int n);
struct miqt_string QGraphicsWebView_TrUtf82(const char* s, const char* c);
struct miqt_string QGraphicsWebView_TrUtf83(const char* s, const char* c, int n);
void QGraphicsWebView_Load2(QGraphicsWebView* self, QNetworkRequest* request, int operation);
void QGraphicsWebView_Load3(QGraphicsWebView* self, QNetworkRequest* request, int operation, struct miqt_string body);
void QGraphicsWebView_SetHtml2(QGraphicsWebView* self, struct miqt_string html, QUrl* baseUrl);
void QGraphicsWebView_SetContent2(QGraphicsWebView* self, struct miqt_string data, struct miqt_string mimeType);
void QGraphicsWebView_SetContent3(QGraphicsWebView* self, struct miqt_string data, struct miqt_string mimeType, QUrl* baseUrl);
void QGraphicsWebView_TriggerPageAction2(QGraphicsWebView* self, int action, bool checked);
bool QGraphicsWebView_FindText2(QGraphicsWebView* self, struct miqt_string subString, int options);
void QGraphicsWebView_SetRenderHint2(QGraphicsWebView* self, int param1, bool enabled);
void QGraphicsWebView_override_virtual_SetGeometry(void* self, intptr_t slot);
void QGraphicsWebView_virtualbase_SetGeometry(void* self, QRectF* rect);
void QGraphicsWebView_override_virtual_UpdateGeometry(void* self, intptr_t slot);
void QGraphicsWebView_virtualbase_UpdateGeometry(void* self);
void QGraphicsWebView_override_virtual_Paint(void* self, intptr_t slot);
void QGraphicsWebView_virtualbase_Paint(void* self, QPainter* param1, QStyleOptionGraphicsItem* options, QWidget* widget);
void QGraphicsWebView_override_virtual_ItemChange(void* self, intptr_t slot);
QVariant* QGraphicsWebView_virtualbase_ItemChange(void* self, int change, QVariant* value);
void QGraphicsWebView_override_virtual_Event(void* self, intptr_t slot);
bool QGraphicsWebView_virtualbase_Event(void* self, QEvent* param1);
void QGraphicsWebView_override_virtual_SizeHint(void* self, intptr_t slot);
QSizeF* QGraphicsWebView_virtualbase_SizeHint(const void* self, int which, QSizeF* constraint);
void QGraphicsWebView_override_virtual_InputMethodQuery(void* self, intptr_t slot);
QVariant* QGraphicsWebView_virtualbase_InputMethodQuery(const void* self, int query);
void QGraphicsWebView_override_virtual_MousePressEvent(void* self, intptr_t slot);
void QGraphicsWebView_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* param1);
void QGraphicsWebView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot);
void QGraphicsWebView_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* param1);
void QGraphicsWebView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot);
void QGraphicsWebView_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* param1);
void QGraphicsWebView_override_virtual_MouseMoveEvent(void* self, intptr_t slot);
void QGraphicsWebView_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* param1);
void QGraphicsWebView_override_virtual_HoverMoveEvent(void* self, intptr_t slot);
void QGraphicsWebView_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* param1);
void QGraphicsWebView_override_virtual_HoverLeaveEvent(void* self, intptr_t slot);
void QGraphicsWebView_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* param1);
void QGraphicsWebView_override_virtual_WheelEvent(void* self, intptr_t slot);
void QGraphicsWebView_virtualbase_WheelEvent(void* self, QGraphicsSceneWheelEvent* param1);
void QGraphicsWebView_override_virtual_KeyPressEvent(void* self, intptr_t slot);
void QGraphicsWebView_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1);
void QGraphicsWebView_override_virtual_KeyReleaseEvent(void* self, intptr_t slot);
void QGraphicsWebView_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* param1);
void QGraphicsWebView_override_virtual_ContextMenuEvent(void* self, intptr_t slot);
void QGraphicsWebView_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* param1);
void QGraphicsWebView_override_virtual_DragEnterEvent(void* self, intptr_t slot);
void QGraphicsWebView_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* param1);
void QGraphicsWebView_override_virtual_DragLeaveEvent(void* self, intptr_t slot);
void QGraphicsWebView_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* param1);
void QGraphicsWebView_override_virtual_DragMoveEvent(void* self, intptr_t slot);
void QGraphicsWebView_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* param1);
void QGraphicsWebView_override_virtual_DropEvent(void* self, intptr_t slot);
void QGraphicsWebView_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* param1);
void QGraphicsWebView_override_virtual_FocusInEvent(void* self, intptr_t slot);
void QGraphicsWebView_virtualbase_FocusInEvent(void* self, QFocusEvent* param1);
void QGraphicsWebView_override_virtual_FocusOutEvent(void* self, intptr_t slot);
void QGraphicsWebView_virtualbase_FocusOutEvent(void* self, QFocusEvent* param1);
void QGraphicsWebView_override_virtual_InputMethodEvent(void* self, intptr_t slot);
void QGraphicsWebView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1);
void QGraphicsWebView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot);
bool QGraphicsWebView_virtualbase_FocusNextPrevChild(void* self, bool next);
void QGraphicsWebView_override_virtual_SceneEvent(void* self, intptr_t slot);
bool QGraphicsWebView_virtualbase_SceneEvent(void* self, QEvent* param1);
void QGraphicsWebView_override_virtual_GetContentsMargins(void* self, intptr_t slot);
void QGraphicsWebView_virtualbase_GetContentsMargins(const void* self, double* left, double* top, double* right, double* bottom);
void QGraphicsWebView_override_virtual_Type(void* self, intptr_t slot);
int QGraphicsWebView_virtualbase_Type(const void* self);
void QGraphicsWebView_override_virtual_PaintWindowFrame(void* self, intptr_t slot);
void QGraphicsWebView_virtualbase_PaintWindowFrame(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget);
void QGraphicsWebView_override_virtual_BoundingRect(void* self, intptr_t slot);
QRectF* QGraphicsWebView_virtualbase_BoundingRect(const void* self);
void QGraphicsWebView_override_virtual_Shape(void* self, intptr_t slot);
QPainterPath* QGraphicsWebView_virtualbase_Shape(const void* self);
void QGraphicsWebView_override_virtual_InitStyleOption(void* self, intptr_t slot);
void QGraphicsWebView_virtualbase_InitStyleOption(const void* self, QStyleOption* option);
void QGraphicsWebView_override_virtual_PropertyChange(void* self, intptr_t slot);
QVariant* QGraphicsWebView_virtualbase_PropertyChange(void* self, struct miqt_string propertyName, QVariant* value);
void QGraphicsWebView_override_virtual_WindowFrameEvent(void* self, intptr_t slot);
bool QGraphicsWebView_virtualbase_WindowFrameEvent(void* self, QEvent* e);
void QGraphicsWebView_override_virtual_WindowFrameSectionAt(void* self, intptr_t slot);
int QGraphicsWebView_virtualbase_WindowFrameSectionAt(const void* self, QPointF* pos);
void QGraphicsWebView_override_virtual_ChangeEvent(void* self, intptr_t slot);
void QGraphicsWebView_virtualbase_ChangeEvent(void* self, QEvent* event);
void QGraphicsWebView_override_virtual_CloseEvent(void* self, intptr_t slot);
void QGraphicsWebView_virtualbase_CloseEvent(void* self, QCloseEvent* event);
void QGraphicsWebView_override_virtual_HideEvent(void* self, intptr_t slot);
void QGraphicsWebView_virtualbase_HideEvent(void* self, QHideEvent* event);
void QGraphicsWebView_override_virtual_MoveEvent(void* self, intptr_t slot);
void QGraphicsWebView_virtualbase_MoveEvent(void* self, QGraphicsSceneMoveEvent* event);
void QGraphicsWebView_override_virtual_PolishEvent(void* self, intptr_t slot);
void QGraphicsWebView_virtualbase_PolishEvent(void* self);
void QGraphicsWebView_override_virtual_ResizeEvent(void* self, intptr_t slot);
void QGraphicsWebView_virtualbase_ResizeEvent(void* self, QGraphicsSceneResizeEvent* event);
void QGraphicsWebView_override_virtual_ShowEvent(void* self, intptr_t slot);
void QGraphicsWebView_virtualbase_ShowEvent(void* self, QShowEvent* event);
void QGraphicsWebView_override_virtual_GrabMouseEvent(void* self, intptr_t slot);
void QGraphicsWebView_virtualbase_GrabMouseEvent(void* self, QEvent* event);
void QGraphicsWebView_override_virtual_UngrabMouseEvent(void* self, intptr_t slot);
void QGraphicsWebView_virtualbase_UngrabMouseEvent(void* self, QEvent* event);
void QGraphicsWebView_override_virtual_GrabKeyboardEvent(void* self, intptr_t slot);
void QGraphicsWebView_virtualbase_GrabKeyboardEvent(void* self, QEvent* event);
void QGraphicsWebView_override_virtual_UngrabKeyboardEvent(void* self, intptr_t slot);
void QGraphicsWebView_virtualbase_UngrabKeyboardEvent(void* self, QEvent* event);
void QGraphicsWebView_Delete(QGraphicsWebView* self, bool isSubclass);
#ifdef __cplusplus
} /* extern C */
#endif
#endif

View File

@ -0,0 +1,81 @@
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QWebDatabase>
#include <QWebSecurityOrigin>
#include <qwebdatabase.h>
#include "gen_qwebdatabase.h"
#include "_cgo_export.h"
void QWebDatabase_new(QWebDatabase* other, QWebDatabase** outptr_QWebDatabase) {
QWebDatabase* ret = new QWebDatabase(*other);
*outptr_QWebDatabase = ret;
}
void QWebDatabase_OperatorAssign(QWebDatabase* self, QWebDatabase* other) {
self->operator=(*other);
}
struct miqt_string QWebDatabase_Name(const QWebDatabase* 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;
}
struct miqt_string QWebDatabase_DisplayName(const QWebDatabase* self) {
QString _ret = self->displayName();
// Convert QString from UTF-16 in C++ RAII memory 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;
}
long long QWebDatabase_ExpectedSize(const QWebDatabase* self) {
qint64 _ret = self->expectedSize();
return static_cast<long long>(_ret);
}
long long QWebDatabase_Size(const QWebDatabase* self) {
qint64 _ret = self->size();
return static_cast<long long>(_ret);
}
struct miqt_string QWebDatabase_FileName(const QWebDatabase* self) {
QString _ret = self->fileName();
// Convert QString from UTF-16 in C++ RAII memory 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;
}
QWebSecurityOrigin* QWebDatabase_Origin(const QWebDatabase* self) {
return new QWebSecurityOrigin(self->origin());
}
void QWebDatabase_RemoveDatabase(QWebDatabase* param1) {
QWebDatabase::removeDatabase(*param1);
}
void QWebDatabase_RemoveAllDatabases() {
QWebDatabase::removeAllDatabases();
}
void QWebDatabase_Delete(QWebDatabase* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QWebDatabase*>( self );
} else {
delete self;
}
}

View File

@ -0,0 +1,122 @@
package webkit
/*
#include "gen_qwebdatabase.h"
#include <stdlib.h>
*/
import "C"
import (
"runtime"
"unsafe"
)
type QWebDatabase struct {
h *C.QWebDatabase
isSubclass bool
}
func (this *QWebDatabase) cPointer() *C.QWebDatabase {
if this == nil {
return nil
}
return this.h
}
func (this *QWebDatabase) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
// newQWebDatabase constructs the type using only CGO pointers.
func newQWebDatabase(h *C.QWebDatabase) *QWebDatabase {
if h == nil {
return nil
}
return &QWebDatabase{h: h}
}
// UnsafeNewQWebDatabase constructs the type using only unsafe pointers.
func UnsafeNewQWebDatabase(h unsafe.Pointer) *QWebDatabase {
if h == nil {
return nil
}
return &QWebDatabase{h: (*C.QWebDatabase)(h)}
}
// NewQWebDatabase constructs a new QWebDatabase object.
func NewQWebDatabase(other *QWebDatabase) *QWebDatabase {
var outptr_QWebDatabase *C.QWebDatabase = nil
C.QWebDatabase_new(other.cPointer(), &outptr_QWebDatabase)
ret := newQWebDatabase(outptr_QWebDatabase)
ret.isSubclass = true
return ret
}
func (this *QWebDatabase) OperatorAssign(other *QWebDatabase) {
C.QWebDatabase_OperatorAssign(this.h, other.cPointer())
}
func (this *QWebDatabase) Name() string {
var _ms C.struct_miqt_string = C.QWebDatabase_Name(this.h)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QWebDatabase) DisplayName() string {
var _ms C.struct_miqt_string = C.QWebDatabase_DisplayName(this.h)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QWebDatabase) ExpectedSize() int64 {
return (int64)(C.QWebDatabase_ExpectedSize(this.h))
}
func (this *QWebDatabase) Size() int64 {
return (int64)(C.QWebDatabase_Size(this.h))
}
func (this *QWebDatabase) FileName() string {
var _ms C.struct_miqt_string = C.QWebDatabase_FileName(this.h)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QWebDatabase) Origin() *QWebSecurityOrigin {
_ret := C.QWebDatabase_Origin(this.h)
_goptr := newQWebSecurityOrigin(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func QWebDatabase_RemoveDatabase(param1 *QWebDatabase) {
C.QWebDatabase_RemoveDatabase(param1.cPointer())
}
func QWebDatabase_RemoveAllDatabases() {
C.QWebDatabase_RemoveAllDatabases()
}
// Delete this object from C++ memory.
func (this *QWebDatabase) Delete() {
C.QWebDatabase_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 *QWebDatabase) GoGC() {
runtime.SetFinalizer(this, func(this *QWebDatabase) {
this.Delete()
runtime.KeepAlive(this.h)
})
}

View File

@ -0,0 +1,41 @@
#pragma once
#ifndef MIQT_QT_WEBKIT_GEN_QWEBDATABASE_H
#define MIQT_QT_WEBKIT_GEN_QWEBDATABASE_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 QWebDatabase;
class QWebSecurityOrigin;
#else
typedef struct QWebDatabase QWebDatabase;
typedef struct QWebSecurityOrigin QWebSecurityOrigin;
#endif
void QWebDatabase_new(QWebDatabase* other, QWebDatabase** outptr_QWebDatabase);
void QWebDatabase_OperatorAssign(QWebDatabase* self, QWebDatabase* other);
struct miqt_string QWebDatabase_Name(const QWebDatabase* self);
struct miqt_string QWebDatabase_DisplayName(const QWebDatabase* self);
long long QWebDatabase_ExpectedSize(const QWebDatabase* self);
long long QWebDatabase_Size(const QWebDatabase* self);
struct miqt_string QWebDatabase_FileName(const QWebDatabase* self);
QWebSecurityOrigin* QWebDatabase_Origin(const QWebDatabase* self);
void QWebDatabase_RemoveDatabase(QWebDatabase* param1);
void QWebDatabase_RemoveAllDatabases();
void QWebDatabase_Delete(QWebDatabase* self, bool isSubclass);
#ifdef __cplusplus
} /* extern C */
#endif
#endif

View File

@ -0,0 +1,755 @@
#include <QList>
#include <QPainter>
#include <QRect>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QVariant>
#include <QWebElement>
#include <QWebElementCollection>
#define WORKAROUND_INNER_CLASS_DEFINITION_QWebElementCollection__const_iterator
#define WORKAROUND_INNER_CLASS_DEFINITION_QWebElementCollection__iterator
#include <QWebFrame>
#include <qwebelement.h>
#include "gen_qwebelement.h"
#include "_cgo_export.h"
void QWebElement_new(QWebElement** outptr_QWebElement) {
QWebElement* ret = new QWebElement();
*outptr_QWebElement = ret;
}
void QWebElement_new2(QWebElement* param1, QWebElement** outptr_QWebElement) {
QWebElement* ret = new QWebElement(*param1);
*outptr_QWebElement = ret;
}
void QWebElement_OperatorAssign(QWebElement* self, QWebElement* param1) {
self->operator=(*param1);
}
bool QWebElement_OperatorEqual(const QWebElement* self, QWebElement* o) {
return (*self == *o);
}
bool QWebElement_OperatorNotEqual(const QWebElement* self, QWebElement* o) {
return (*self != *o);
}
bool QWebElement_IsNull(const QWebElement* self) {
return self->isNull();
}
QWebElementCollection* QWebElement_FindAll(const QWebElement* self, struct miqt_string selectorQuery) {
QString selectorQuery_QString = QString::fromUtf8(selectorQuery.data, selectorQuery.len);
return new QWebElementCollection(self->findAll(selectorQuery_QString));
}
QWebElement* QWebElement_FindFirst(const QWebElement* self, struct miqt_string selectorQuery) {
QString selectorQuery_QString = QString::fromUtf8(selectorQuery.data, selectorQuery.len);
return new QWebElement(self->findFirst(selectorQuery_QString));
}
void QWebElement_SetPlainText(QWebElement* self, struct miqt_string text) {
QString text_QString = QString::fromUtf8(text.data, text.len);
self->setPlainText(text_QString);
}
struct miqt_string QWebElement_ToPlainText(const QWebElement* self) {
QString _ret = self->toPlainText();
// Convert QString from UTF-16 in C++ RAII memory 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 QWebElement_SetOuterXml(QWebElement* self, struct miqt_string markup) {
QString markup_QString = QString::fromUtf8(markup.data, markup.len);
self->setOuterXml(markup_QString);
}
struct miqt_string QWebElement_ToOuterXml(const QWebElement* self) {
QString _ret = self->toOuterXml();
// Convert QString from UTF-16 in C++ RAII memory 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 QWebElement_SetInnerXml(QWebElement* self, struct miqt_string markup) {
QString markup_QString = QString::fromUtf8(markup.data, markup.len);
self->setInnerXml(markup_QString);
}
struct miqt_string QWebElement_ToInnerXml(const QWebElement* self) {
QString _ret = self->toInnerXml();
// Convert QString from UTF-16 in C++ RAII memory 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 QWebElement_SetAttribute(QWebElement* self, struct miqt_string name, struct miqt_string value) {
QString name_QString = QString::fromUtf8(name.data, name.len);
QString value_QString = QString::fromUtf8(value.data, value.len);
self->setAttribute(name_QString, value_QString);
}
void QWebElement_SetAttributeNS(QWebElement* self, struct miqt_string namespaceUri, struct miqt_string name, struct miqt_string value) {
QString namespaceUri_QString = QString::fromUtf8(namespaceUri.data, namespaceUri.len);
QString name_QString = QString::fromUtf8(name.data, name.len);
QString value_QString = QString::fromUtf8(value.data, value.len);
self->setAttributeNS(namespaceUri_QString, name_QString, value_QString);
}
struct miqt_string QWebElement_Attribute(const QWebElement* self, struct miqt_string name) {
QString name_QString = QString::fromUtf8(name.data, name.len);
QString _ret = self->attribute(name_QString);
// Convert QString from UTF-16 in C++ RAII memory 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 QWebElement_AttributeNS(const QWebElement* self, struct miqt_string namespaceUri, struct miqt_string name) {
QString namespaceUri_QString = QString::fromUtf8(namespaceUri.data, namespaceUri.len);
QString name_QString = QString::fromUtf8(name.data, name.len);
QString _ret = self->attributeNS(namespaceUri_QString, name_QString);
// Convert QString from UTF-16 in C++ RAII memory 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 QWebElement_HasAttribute(const QWebElement* self, struct miqt_string name) {
QString name_QString = QString::fromUtf8(name.data, name.len);
return self->hasAttribute(name_QString);
}
bool QWebElement_HasAttributeNS(const QWebElement* self, struct miqt_string namespaceUri, struct miqt_string name) {
QString namespaceUri_QString = QString::fromUtf8(namespaceUri.data, namespaceUri.len);
QString name_QString = QString::fromUtf8(name.data, name.len);
return self->hasAttributeNS(namespaceUri_QString, name_QString);
}
void QWebElement_RemoveAttribute(QWebElement* self, struct miqt_string name) {
QString name_QString = QString::fromUtf8(name.data, name.len);
self->removeAttribute(name_QString);
}
void QWebElement_RemoveAttributeNS(QWebElement* self, struct miqt_string namespaceUri, struct miqt_string name) {
QString namespaceUri_QString = QString::fromUtf8(namespaceUri.data, namespaceUri.len);
QString name_QString = QString::fromUtf8(name.data, name.len);
self->removeAttributeNS(namespaceUri_QString, name_QString);
}
bool QWebElement_HasAttributes(const QWebElement* self) {
return self->hasAttributes();
}
struct miqt_array /* of struct miqt_string */ QWebElement_AttributeNames(const QWebElement* self) {
QStringList _ret = self->attributeNames();
// 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;
}
struct miqt_array /* of struct miqt_string */ QWebElement_Classes(const QWebElement* self) {
QStringList _ret = self->classes();
// 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;
}
bool QWebElement_HasClass(const QWebElement* self, struct miqt_string name) {
QString name_QString = QString::fromUtf8(name.data, name.len);
return self->hasClass(name_QString);
}
void QWebElement_AddClass(QWebElement* self, struct miqt_string name) {
QString name_QString = QString::fromUtf8(name.data, name.len);
self->addClass(name_QString);
}
void QWebElement_RemoveClass(QWebElement* self, struct miqt_string name) {
QString name_QString = QString::fromUtf8(name.data, name.len);
self->removeClass(name_QString);
}
void QWebElement_ToggleClass(QWebElement* self, struct miqt_string name) {
QString name_QString = QString::fromUtf8(name.data, name.len);
self->toggleClass(name_QString);
}
bool QWebElement_HasFocus(const QWebElement* self) {
return self->hasFocus();
}
void QWebElement_SetFocus(QWebElement* self) {
self->setFocus();
}
QRect* QWebElement_Geometry(const QWebElement* self) {
return new QRect(self->geometry());
}
struct miqt_string QWebElement_TagName(const QWebElement* self) {
QString _ret = self->tagName();
// Convert QString from UTF-16 in C++ RAII memory 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 QWebElement_Prefix(const QWebElement* self) {
QString _ret = self->prefix();
// Convert QString from UTF-16 in C++ RAII memory 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 QWebElement_LocalName(const QWebElement* self) {
QString _ret = self->localName();
// Convert QString from UTF-16 in C++ RAII memory 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 QWebElement_NamespaceUri(const QWebElement* self) {
QString _ret = self->namespaceUri();
// Convert QString from UTF-16 in C++ RAII memory 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;
}
QWebElement* QWebElement_Parent(const QWebElement* self) {
return new QWebElement(self->parent());
}
QWebElement* QWebElement_FirstChild(const QWebElement* self) {
return new QWebElement(self->firstChild());
}
QWebElement* QWebElement_LastChild(const QWebElement* self) {
return new QWebElement(self->lastChild());
}
QWebElement* QWebElement_NextSibling(const QWebElement* self) {
return new QWebElement(self->nextSibling());
}
QWebElement* QWebElement_PreviousSibling(const QWebElement* self) {
return new QWebElement(self->previousSibling());
}
QWebElement* QWebElement_Document(const QWebElement* self) {
return new QWebElement(self->document());
}
QWebFrame* QWebElement_WebFrame(const QWebElement* self) {
return self->webFrame();
}
void QWebElement_AppendInside(QWebElement* self, struct miqt_string markup) {
QString markup_QString = QString::fromUtf8(markup.data, markup.len);
self->appendInside(markup_QString);
}
void QWebElement_AppendInsideWithElement(QWebElement* self, QWebElement* element) {
self->appendInside(*element);
}
void QWebElement_PrependInside(QWebElement* self, struct miqt_string markup) {
QString markup_QString = QString::fromUtf8(markup.data, markup.len);
self->prependInside(markup_QString);
}
void QWebElement_PrependInsideWithElement(QWebElement* self, QWebElement* element) {
self->prependInside(*element);
}
void QWebElement_AppendOutside(QWebElement* self, struct miqt_string markup) {
QString markup_QString = QString::fromUtf8(markup.data, markup.len);
self->appendOutside(markup_QString);
}
void QWebElement_AppendOutsideWithElement(QWebElement* self, QWebElement* element) {
self->appendOutside(*element);
}
void QWebElement_PrependOutside(QWebElement* self, struct miqt_string markup) {
QString markup_QString = QString::fromUtf8(markup.data, markup.len);
self->prependOutside(markup_QString);
}
void QWebElement_PrependOutsideWithElement(QWebElement* self, QWebElement* element) {
self->prependOutside(*element);
}
void QWebElement_EncloseContentsWith(QWebElement* self, QWebElement* element) {
self->encloseContentsWith(*element);
}
void QWebElement_EncloseContentsWithWithMarkup(QWebElement* self, struct miqt_string markup) {
QString markup_QString = QString::fromUtf8(markup.data, markup.len);
self->encloseContentsWith(markup_QString);
}
void QWebElement_EncloseWith(QWebElement* self, struct miqt_string markup) {
QString markup_QString = QString::fromUtf8(markup.data, markup.len);
self->encloseWith(markup_QString);
}
void QWebElement_EncloseWithWithElement(QWebElement* self, QWebElement* element) {
self->encloseWith(*element);
}
void QWebElement_Replace(QWebElement* self, struct miqt_string markup) {
QString markup_QString = QString::fromUtf8(markup.data, markup.len);
self->replace(markup_QString);
}
void QWebElement_ReplaceWithElement(QWebElement* self, QWebElement* element) {
self->replace(*element);
}
QWebElement* QWebElement_Clone(const QWebElement* self) {
return new QWebElement(self->clone());
}
QWebElement* QWebElement_TakeFromDocument(QWebElement* self) {
QWebElement& _ret = self->takeFromDocument();
// Cast returned reference into pointer
return &_ret;
}
void QWebElement_RemoveFromDocument(QWebElement* self) {
self->removeFromDocument();
}
void QWebElement_RemoveAllChildren(QWebElement* self) {
self->removeAllChildren();
}
QVariant* QWebElement_EvaluateJavaScript(QWebElement* self, struct miqt_string scriptSource) {
QString scriptSource_QString = QString::fromUtf8(scriptSource.data, scriptSource.len);
return new QVariant(self->evaluateJavaScript(scriptSource_QString));
}
struct miqt_string QWebElement_StyleProperty(const QWebElement* self, struct miqt_string name, int strategy) {
QString name_QString = QString::fromUtf8(name.data, name.len);
QString _ret = self->styleProperty(name_QString, static_cast<QWebElement::StyleResolveStrategy>(strategy));
// Convert QString from UTF-16 in C++ RAII memory 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 QWebElement_SetStyleProperty(QWebElement* self, struct miqt_string name, struct miqt_string value) {
QString name_QString = QString::fromUtf8(name.data, name.len);
QString value_QString = QString::fromUtf8(value.data, value.len);
self->setStyleProperty(name_QString, value_QString);
}
void QWebElement_Render(QWebElement* self, QPainter* painter) {
self->render(painter);
}
void QWebElement_Render2(QWebElement* self, QPainter* painter, QRect* clipRect) {
self->render(painter, *clipRect);
}
struct miqt_string QWebElement_Attribute2(const QWebElement* self, struct miqt_string name, struct miqt_string defaultValue) {
QString name_QString = QString::fromUtf8(name.data, name.len);
QString defaultValue_QString = QString::fromUtf8(defaultValue.data, defaultValue.len);
QString _ret = self->attribute(name_QString, defaultValue_QString);
// Convert QString from UTF-16 in C++ RAII memory 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 QWebElement_AttributeNS3(const QWebElement* self, struct miqt_string namespaceUri, struct miqt_string name, struct miqt_string defaultValue) {
QString namespaceUri_QString = QString::fromUtf8(namespaceUri.data, namespaceUri.len);
QString name_QString = QString::fromUtf8(name.data, name.len);
QString defaultValue_QString = QString::fromUtf8(defaultValue.data, defaultValue.len);
QString _ret = self->attributeNS(namespaceUri_QString, name_QString, defaultValue_QString);
// Convert QString from UTF-16 in C++ RAII memory 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 */ QWebElement_AttributeNames1(const QWebElement* self, struct miqt_string namespaceUri) {
QString namespaceUri_QString = QString::fromUtf8(namespaceUri.data, namespaceUri.len);
QStringList _ret = self->attributeNames(namespaceUri_QString);
// 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 QWebElement_Delete(QWebElement* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QWebElement*>( self );
} else {
delete self;
}
}
void QWebElementCollection_new(QWebElementCollection** outptr_QWebElementCollection) {
QWebElementCollection* ret = new QWebElementCollection();
*outptr_QWebElementCollection = ret;
}
void QWebElementCollection_new2(QWebElement* contextElement, struct miqt_string query, QWebElementCollection** outptr_QWebElementCollection) {
QString query_QString = QString::fromUtf8(query.data, query.len);
QWebElementCollection* ret = new QWebElementCollection(*contextElement, query_QString);
*outptr_QWebElementCollection = ret;
}
void QWebElementCollection_new3(QWebElementCollection* param1, QWebElementCollection** outptr_QWebElementCollection) {
QWebElementCollection* ret = new QWebElementCollection(*param1);
*outptr_QWebElementCollection = ret;
}
void QWebElementCollection_OperatorAssign(QWebElementCollection* self, QWebElementCollection* param1) {
self->operator=(*param1);
}
QWebElementCollection* QWebElementCollection_OperatorPlus(const QWebElementCollection* self, QWebElementCollection* other) {
return new QWebElementCollection(self->operator+(*other));
}
QWebElementCollection* QWebElementCollection_OperatorPlusAssign(QWebElementCollection* self, QWebElementCollection* other) {
QWebElementCollection& _ret = self->operator+=(*other);
// Cast returned reference into pointer
return &_ret;
}
void QWebElementCollection_Append(QWebElementCollection* self, QWebElementCollection* collection) {
self->append(*collection);
}
int QWebElementCollection_Count(const QWebElementCollection* self) {
return self->count();
}
QWebElement* QWebElementCollection_At(const QWebElementCollection* self, int i) {
return new QWebElement(self->at(static_cast<int>(i)));
}
QWebElement* QWebElementCollection_OperatorSubscript(const QWebElementCollection* self, int i) {
return new QWebElement(self->operator[](static_cast<int>(i)));
}
QWebElement* QWebElementCollection_First(const QWebElementCollection* self) {
return new QWebElement(self->first());
}
QWebElement* QWebElementCollection_Last(const QWebElementCollection* self) {
return new QWebElement(self->last());
}
struct miqt_array /* of QWebElement* */ QWebElementCollection_ToList(const QWebElementCollection* self) {
QList<QWebElement> _ret = self->toList();
// Convert QList<> from C++ memory to manually-managed C memory
QWebElement** _arr = static_cast<QWebElement**>(malloc(sizeof(QWebElement*) * _ret.length()));
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
_arr[i] = new QWebElement(_ret[i]);
}
struct miqt_array _out;
_out.len = _ret.length();
_out.data = static_cast<void*>(_arr);
return _out;
}
QWebElementCollection__const_iterator* QWebElementCollection_Begin(const QWebElementCollection* self) {
return new QWebElementCollection::const_iterator(self->begin());
}
QWebElementCollection__const_iterator* QWebElementCollection_End(const QWebElementCollection* self) {
return new QWebElementCollection::const_iterator(self->end());
}
QWebElementCollection__const_iterator* QWebElementCollection_ConstBegin(const QWebElementCollection* self) {
return new QWebElementCollection::const_iterator(self->constBegin());
}
QWebElementCollection__const_iterator* QWebElementCollection_ConstEnd(const QWebElementCollection* self) {
return new QWebElementCollection::const_iterator(self->constEnd());
}
QWebElementCollection__iterator* QWebElementCollection_Begin2(QWebElementCollection* self) {
return new QWebElementCollection::iterator(self->begin());
}
QWebElementCollection__iterator* QWebElementCollection_End2(QWebElementCollection* self) {
return new QWebElementCollection::iterator(self->end());
}
void QWebElementCollection_Delete(QWebElementCollection* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QWebElementCollection*>( self );
} else {
delete self;
}
}
void QWebElementCollection__const_iterator_new(QWebElementCollection* collection_, int index, QWebElementCollection__const_iterator** outptr_QWebElementCollection__const_iterator) {
QWebElementCollection::const_iterator* ret = new QWebElementCollection::const_iterator(collection_, static_cast<int>(index));
*outptr_QWebElementCollection__const_iterator = ret;
}
void QWebElementCollection__const_iterator_new2(QWebElementCollection__const_iterator* o, QWebElementCollection__const_iterator** outptr_QWebElementCollection__const_iterator) {
QWebElementCollection::const_iterator* ret = new QWebElementCollection::const_iterator(*o);
*outptr_QWebElementCollection__const_iterator = ret;
}
QWebElement* QWebElementCollection__const_iterator_OperatorMultiply(const QWebElementCollection__const_iterator* self) {
return new QWebElement(self->operator*());
}
bool QWebElementCollection__const_iterator_OperatorEqual(const QWebElementCollection__const_iterator* self, QWebElementCollection__const_iterator* o) {
return (*self == *o);
}
bool QWebElementCollection__const_iterator_OperatorNotEqual(const QWebElementCollection__const_iterator* self, QWebElementCollection__const_iterator* o) {
return (*self != *o);
}
bool QWebElementCollection__const_iterator_OperatorLesser(const QWebElementCollection__const_iterator* self, QWebElementCollection__const_iterator* o) {
return (*self < *o);
}
bool QWebElementCollection__const_iterator_OperatorLesserOrEqual(const QWebElementCollection__const_iterator* self, QWebElementCollection__const_iterator* o) {
return (*self <= *o);
}
bool QWebElementCollection__const_iterator_OperatorGreater(const QWebElementCollection__const_iterator* self, QWebElementCollection__const_iterator* o) {
return (*self > *o);
}
bool QWebElementCollection__const_iterator_OperatorGreaterOrEqual(const QWebElementCollection__const_iterator* self, QWebElementCollection__const_iterator* o) {
return (*self >= *o);
}
QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_OperatorPlusPlus(QWebElementCollection__const_iterator* self) {
QWebElementCollection::const_iterator& _ret = self->operator++();
// Cast returned reference into pointer
return &_ret;
}
QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_OperatorPlusPlusWithInt(QWebElementCollection__const_iterator* self, int param1) {
return new QWebElementCollection::const_iterator(self->operator++(static_cast<int>(param1)));
}
QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_OperatorMinusMinus(QWebElementCollection__const_iterator* self) {
QWebElementCollection::const_iterator& _ret = self->operator--();
// Cast returned reference into pointer
return &_ret;
}
QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_OperatorMinusMinusWithInt(QWebElementCollection__const_iterator* self, int param1) {
return new QWebElementCollection::const_iterator(self->operator--(static_cast<int>(param1)));
}
QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_OperatorPlusAssign(QWebElementCollection__const_iterator* self, int j) {
QWebElementCollection::const_iterator& _ret = self->operator+=(static_cast<int>(j));
// Cast returned reference into pointer
return &_ret;
}
QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_OperatorMinusAssign(QWebElementCollection__const_iterator* self, int j) {
QWebElementCollection::const_iterator& _ret = self->operator-=(static_cast<int>(j));
// Cast returned reference into pointer
return &_ret;
}
QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_OperatorPlus(const QWebElementCollection__const_iterator* self, int j) {
return new QWebElementCollection::const_iterator(self->operator+(static_cast<int>(j)));
}
QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_OperatorMinus(const QWebElementCollection__const_iterator* self, int j) {
return new QWebElementCollection::const_iterator(self->operator-(static_cast<int>(j)));
}
int QWebElementCollection__const_iterator_OperatorMinusWithQWebElementCollectionconstIterator(const QWebElementCollection__const_iterator* self, QWebElementCollection__const_iterator* j) {
return self->operator-(*j);
}
void QWebElementCollection__const_iterator_Delete(QWebElementCollection__const_iterator* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QWebElementCollection::const_iterator*>( self );
} else {
delete self;
}
}
void QWebElementCollection__iterator_new(QWebElementCollection* collection_, int index, QWebElementCollection__iterator** outptr_QWebElementCollection__iterator) {
QWebElementCollection::iterator* ret = new QWebElementCollection::iterator(collection_, static_cast<int>(index));
*outptr_QWebElementCollection__iterator = ret;
}
void QWebElementCollection__iterator_new2(QWebElementCollection__iterator* o, QWebElementCollection__iterator** outptr_QWebElementCollection__iterator) {
QWebElementCollection::iterator* ret = new QWebElementCollection::iterator(*o);
*outptr_QWebElementCollection__iterator = ret;
}
QWebElement* QWebElementCollection__iterator_OperatorMultiply(const QWebElementCollection__iterator* self) {
return new QWebElement(self->operator*());
}
bool QWebElementCollection__iterator_OperatorEqual(const QWebElementCollection__iterator* self, QWebElementCollection__iterator* o) {
return (*self == *o);
}
bool QWebElementCollection__iterator_OperatorNotEqual(const QWebElementCollection__iterator* self, QWebElementCollection__iterator* o) {
return (*self != *o);
}
bool QWebElementCollection__iterator_OperatorLesser(const QWebElementCollection__iterator* self, QWebElementCollection__iterator* o) {
return (*self < *o);
}
bool QWebElementCollection__iterator_OperatorLesserOrEqual(const QWebElementCollection__iterator* self, QWebElementCollection__iterator* o) {
return (*self <= *o);
}
bool QWebElementCollection__iterator_OperatorGreater(const QWebElementCollection__iterator* self, QWebElementCollection__iterator* o) {
return (*self > *o);
}
bool QWebElementCollection__iterator_OperatorGreaterOrEqual(const QWebElementCollection__iterator* self, QWebElementCollection__iterator* o) {
return (*self >= *o);
}
QWebElementCollection__iterator* QWebElementCollection__iterator_OperatorPlusPlus(QWebElementCollection__iterator* self) {
QWebElementCollection::iterator& _ret = self->operator++();
// Cast returned reference into pointer
return &_ret;
}
QWebElementCollection__iterator* QWebElementCollection__iterator_OperatorPlusPlusWithInt(QWebElementCollection__iterator* self, int param1) {
return new QWebElementCollection::iterator(self->operator++(static_cast<int>(param1)));
}
QWebElementCollection__iterator* QWebElementCollection__iterator_OperatorMinusMinus(QWebElementCollection__iterator* self) {
QWebElementCollection::iterator& _ret = self->operator--();
// Cast returned reference into pointer
return &_ret;
}
QWebElementCollection__iterator* QWebElementCollection__iterator_OperatorMinusMinusWithInt(QWebElementCollection__iterator* self, int param1) {
return new QWebElementCollection::iterator(self->operator--(static_cast<int>(param1)));
}
QWebElementCollection__iterator* QWebElementCollection__iterator_OperatorPlusAssign(QWebElementCollection__iterator* self, int j) {
QWebElementCollection::iterator& _ret = self->operator+=(static_cast<int>(j));
// Cast returned reference into pointer
return &_ret;
}
QWebElementCollection__iterator* QWebElementCollection__iterator_OperatorMinusAssign(QWebElementCollection__iterator* self, int j) {
QWebElementCollection::iterator& _ret = self->operator-=(static_cast<int>(j));
// Cast returned reference into pointer
return &_ret;
}
QWebElementCollection__iterator* QWebElementCollection__iterator_OperatorPlus(const QWebElementCollection__iterator* self, int j) {
return new QWebElementCollection::iterator(self->operator+(static_cast<int>(j)));
}
QWebElementCollection__iterator* QWebElementCollection__iterator_OperatorMinus(const QWebElementCollection__iterator* self, int j) {
return new QWebElementCollection::iterator(self->operator-(static_cast<int>(j)));
}
int QWebElementCollection__iterator_OperatorMinusWithQWebElementCollectioniterator(const QWebElementCollection__iterator* self, QWebElementCollection__iterator* j) {
return self->operator-(*j);
}
void QWebElementCollection__iterator_Delete(QWebElementCollection__iterator* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QWebElementCollection::iterator*>( self );
} else {
delete self;
}
}

1105
qt/webkit/gen_qwebelement.go Normal file

File diff suppressed because it is too large Load Diff

181
qt/webkit/gen_qwebelement.h Normal file
View File

@ -0,0 +1,181 @@
#pragma once
#ifndef MIQT_QT_WEBKIT_GEN_QWEBELEMENT_H
#define MIQT_QT_WEBKIT_GEN_QWEBELEMENT_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 QPainter;
class QRect;
class QVariant;
class QWebElement;
class QWebElementCollection;
#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QWebElementCollection__const_iterator)
typedef QWebElementCollection::const_iterator QWebElementCollection__const_iterator;
#else
class QWebElementCollection__const_iterator;
#endif
#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QWebElementCollection__iterator)
typedef QWebElementCollection::iterator QWebElementCollection__iterator;
#else
class QWebElementCollection__iterator;
#endif
class QWebFrame;
#else
typedef struct QPainter QPainter;
typedef struct QRect QRect;
typedef struct QVariant QVariant;
typedef struct QWebElement QWebElement;
typedef struct QWebElementCollection QWebElementCollection;
typedef struct QWebElementCollection__const_iterator QWebElementCollection__const_iterator;
typedef struct QWebElementCollection__iterator QWebElementCollection__iterator;
typedef struct QWebFrame QWebFrame;
#endif
void QWebElement_new(QWebElement** outptr_QWebElement);
void QWebElement_new2(QWebElement* param1, QWebElement** outptr_QWebElement);
void QWebElement_OperatorAssign(QWebElement* self, QWebElement* param1);
bool QWebElement_OperatorEqual(const QWebElement* self, QWebElement* o);
bool QWebElement_OperatorNotEqual(const QWebElement* self, QWebElement* o);
bool QWebElement_IsNull(const QWebElement* self);
QWebElementCollection* QWebElement_FindAll(const QWebElement* self, struct miqt_string selectorQuery);
QWebElement* QWebElement_FindFirst(const QWebElement* self, struct miqt_string selectorQuery);
void QWebElement_SetPlainText(QWebElement* self, struct miqt_string text);
struct miqt_string QWebElement_ToPlainText(const QWebElement* self);
void QWebElement_SetOuterXml(QWebElement* self, struct miqt_string markup);
struct miqt_string QWebElement_ToOuterXml(const QWebElement* self);
void QWebElement_SetInnerXml(QWebElement* self, struct miqt_string markup);
struct miqt_string QWebElement_ToInnerXml(const QWebElement* self);
void QWebElement_SetAttribute(QWebElement* self, struct miqt_string name, struct miqt_string value);
void QWebElement_SetAttributeNS(QWebElement* self, struct miqt_string namespaceUri, struct miqt_string name, struct miqt_string value);
struct miqt_string QWebElement_Attribute(const QWebElement* self, struct miqt_string name);
struct miqt_string QWebElement_AttributeNS(const QWebElement* self, struct miqt_string namespaceUri, struct miqt_string name);
bool QWebElement_HasAttribute(const QWebElement* self, struct miqt_string name);
bool QWebElement_HasAttributeNS(const QWebElement* self, struct miqt_string namespaceUri, struct miqt_string name);
void QWebElement_RemoveAttribute(QWebElement* self, struct miqt_string name);
void QWebElement_RemoveAttributeNS(QWebElement* self, struct miqt_string namespaceUri, struct miqt_string name);
bool QWebElement_HasAttributes(const QWebElement* self);
struct miqt_array /* of struct miqt_string */ QWebElement_AttributeNames(const QWebElement* self);
struct miqt_array /* of struct miqt_string */ QWebElement_Classes(const QWebElement* self);
bool QWebElement_HasClass(const QWebElement* self, struct miqt_string name);
void QWebElement_AddClass(QWebElement* self, struct miqt_string name);
void QWebElement_RemoveClass(QWebElement* self, struct miqt_string name);
void QWebElement_ToggleClass(QWebElement* self, struct miqt_string name);
bool QWebElement_HasFocus(const QWebElement* self);
void QWebElement_SetFocus(QWebElement* self);
QRect* QWebElement_Geometry(const QWebElement* self);
struct miqt_string QWebElement_TagName(const QWebElement* self);
struct miqt_string QWebElement_Prefix(const QWebElement* self);
struct miqt_string QWebElement_LocalName(const QWebElement* self);
struct miqt_string QWebElement_NamespaceUri(const QWebElement* self);
QWebElement* QWebElement_Parent(const QWebElement* self);
QWebElement* QWebElement_FirstChild(const QWebElement* self);
QWebElement* QWebElement_LastChild(const QWebElement* self);
QWebElement* QWebElement_NextSibling(const QWebElement* self);
QWebElement* QWebElement_PreviousSibling(const QWebElement* self);
QWebElement* QWebElement_Document(const QWebElement* self);
QWebFrame* QWebElement_WebFrame(const QWebElement* self);
void QWebElement_AppendInside(QWebElement* self, struct miqt_string markup);
void QWebElement_AppendInsideWithElement(QWebElement* self, QWebElement* element);
void QWebElement_PrependInside(QWebElement* self, struct miqt_string markup);
void QWebElement_PrependInsideWithElement(QWebElement* self, QWebElement* element);
void QWebElement_AppendOutside(QWebElement* self, struct miqt_string markup);
void QWebElement_AppendOutsideWithElement(QWebElement* self, QWebElement* element);
void QWebElement_PrependOutside(QWebElement* self, struct miqt_string markup);
void QWebElement_PrependOutsideWithElement(QWebElement* self, QWebElement* element);
void QWebElement_EncloseContentsWith(QWebElement* self, QWebElement* element);
void QWebElement_EncloseContentsWithWithMarkup(QWebElement* self, struct miqt_string markup);
void QWebElement_EncloseWith(QWebElement* self, struct miqt_string markup);
void QWebElement_EncloseWithWithElement(QWebElement* self, QWebElement* element);
void QWebElement_Replace(QWebElement* self, struct miqt_string markup);
void QWebElement_ReplaceWithElement(QWebElement* self, QWebElement* element);
QWebElement* QWebElement_Clone(const QWebElement* self);
QWebElement* QWebElement_TakeFromDocument(QWebElement* self);
void QWebElement_RemoveFromDocument(QWebElement* self);
void QWebElement_RemoveAllChildren(QWebElement* self);
QVariant* QWebElement_EvaluateJavaScript(QWebElement* self, struct miqt_string scriptSource);
struct miqt_string QWebElement_StyleProperty(const QWebElement* self, struct miqt_string name, int strategy);
void QWebElement_SetStyleProperty(QWebElement* self, struct miqt_string name, struct miqt_string value);
void QWebElement_Render(QWebElement* self, QPainter* painter);
void QWebElement_Render2(QWebElement* self, QPainter* painter, QRect* clipRect);
struct miqt_string QWebElement_Attribute2(const QWebElement* self, struct miqt_string name, struct miqt_string defaultValue);
struct miqt_string QWebElement_AttributeNS3(const QWebElement* self, struct miqt_string namespaceUri, struct miqt_string name, struct miqt_string defaultValue);
struct miqt_array /* of struct miqt_string */ QWebElement_AttributeNames1(const QWebElement* self, struct miqt_string namespaceUri);
void QWebElement_Delete(QWebElement* self, bool isSubclass);
void QWebElementCollection_new(QWebElementCollection** outptr_QWebElementCollection);
void QWebElementCollection_new2(QWebElement* contextElement, struct miqt_string query, QWebElementCollection** outptr_QWebElementCollection);
void QWebElementCollection_new3(QWebElementCollection* param1, QWebElementCollection** outptr_QWebElementCollection);
void QWebElementCollection_OperatorAssign(QWebElementCollection* self, QWebElementCollection* param1);
QWebElementCollection* QWebElementCollection_OperatorPlus(const QWebElementCollection* self, QWebElementCollection* other);
QWebElementCollection* QWebElementCollection_OperatorPlusAssign(QWebElementCollection* self, QWebElementCollection* other);
void QWebElementCollection_Append(QWebElementCollection* self, QWebElementCollection* collection);
int QWebElementCollection_Count(const QWebElementCollection* self);
QWebElement* QWebElementCollection_At(const QWebElementCollection* self, int i);
QWebElement* QWebElementCollection_OperatorSubscript(const QWebElementCollection* self, int i);
QWebElement* QWebElementCollection_First(const QWebElementCollection* self);
QWebElement* QWebElementCollection_Last(const QWebElementCollection* self);
struct miqt_array /* of QWebElement* */ QWebElementCollection_ToList(const QWebElementCollection* self);
QWebElementCollection__const_iterator* QWebElementCollection_Begin(const QWebElementCollection* self);
QWebElementCollection__const_iterator* QWebElementCollection_End(const QWebElementCollection* self);
QWebElementCollection__const_iterator* QWebElementCollection_ConstBegin(const QWebElementCollection* self);
QWebElementCollection__const_iterator* QWebElementCollection_ConstEnd(const QWebElementCollection* self);
QWebElementCollection__iterator* QWebElementCollection_Begin2(QWebElementCollection* self);
QWebElementCollection__iterator* QWebElementCollection_End2(QWebElementCollection* self);
void QWebElementCollection_Delete(QWebElementCollection* self, bool isSubclass);
void QWebElementCollection__const_iterator_new(QWebElementCollection* collection_, int index, QWebElementCollection__const_iterator** outptr_QWebElementCollection__const_iterator);
void QWebElementCollection__const_iterator_new2(QWebElementCollection__const_iterator* o, QWebElementCollection__const_iterator** outptr_QWebElementCollection__const_iterator);
QWebElement* QWebElementCollection__const_iterator_OperatorMultiply(const QWebElementCollection__const_iterator* self);
bool QWebElementCollection__const_iterator_OperatorEqual(const QWebElementCollection__const_iterator* self, QWebElementCollection__const_iterator* o);
bool QWebElementCollection__const_iterator_OperatorNotEqual(const QWebElementCollection__const_iterator* self, QWebElementCollection__const_iterator* o);
bool QWebElementCollection__const_iterator_OperatorLesser(const QWebElementCollection__const_iterator* self, QWebElementCollection__const_iterator* o);
bool QWebElementCollection__const_iterator_OperatorLesserOrEqual(const QWebElementCollection__const_iterator* self, QWebElementCollection__const_iterator* o);
bool QWebElementCollection__const_iterator_OperatorGreater(const QWebElementCollection__const_iterator* self, QWebElementCollection__const_iterator* o);
bool QWebElementCollection__const_iterator_OperatorGreaterOrEqual(const QWebElementCollection__const_iterator* self, QWebElementCollection__const_iterator* o);
QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_OperatorPlusPlus(QWebElementCollection__const_iterator* self);
QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_OperatorPlusPlusWithInt(QWebElementCollection__const_iterator* self, int param1);
QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_OperatorMinusMinus(QWebElementCollection__const_iterator* self);
QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_OperatorMinusMinusWithInt(QWebElementCollection__const_iterator* self, int param1);
QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_OperatorPlusAssign(QWebElementCollection__const_iterator* self, int j);
QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_OperatorMinusAssign(QWebElementCollection__const_iterator* self, int j);
QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_OperatorPlus(const QWebElementCollection__const_iterator* self, int j);
QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_OperatorMinus(const QWebElementCollection__const_iterator* self, int j);
int QWebElementCollection__const_iterator_OperatorMinusWithQWebElementCollectionconstIterator(const QWebElementCollection__const_iterator* self, QWebElementCollection__const_iterator* j);
void QWebElementCollection__const_iterator_Delete(QWebElementCollection__const_iterator* self, bool isSubclass);
void QWebElementCollection__iterator_new(QWebElementCollection* collection_, int index, QWebElementCollection__iterator** outptr_QWebElementCollection__iterator);
void QWebElementCollection__iterator_new2(QWebElementCollection__iterator* o, QWebElementCollection__iterator** outptr_QWebElementCollection__iterator);
QWebElement* QWebElementCollection__iterator_OperatorMultiply(const QWebElementCollection__iterator* self);
bool QWebElementCollection__iterator_OperatorEqual(const QWebElementCollection__iterator* self, QWebElementCollection__iterator* o);
bool QWebElementCollection__iterator_OperatorNotEqual(const QWebElementCollection__iterator* self, QWebElementCollection__iterator* o);
bool QWebElementCollection__iterator_OperatorLesser(const QWebElementCollection__iterator* self, QWebElementCollection__iterator* o);
bool QWebElementCollection__iterator_OperatorLesserOrEqual(const QWebElementCollection__iterator* self, QWebElementCollection__iterator* o);
bool QWebElementCollection__iterator_OperatorGreater(const QWebElementCollection__iterator* self, QWebElementCollection__iterator* o);
bool QWebElementCollection__iterator_OperatorGreaterOrEqual(const QWebElementCollection__iterator* self, QWebElementCollection__iterator* o);
QWebElementCollection__iterator* QWebElementCollection__iterator_OperatorPlusPlus(QWebElementCollection__iterator* self);
QWebElementCollection__iterator* QWebElementCollection__iterator_OperatorPlusPlusWithInt(QWebElementCollection__iterator* self, int param1);
QWebElementCollection__iterator* QWebElementCollection__iterator_OperatorMinusMinus(QWebElementCollection__iterator* self);
QWebElementCollection__iterator* QWebElementCollection__iterator_OperatorMinusMinusWithInt(QWebElementCollection__iterator* self, int param1);
QWebElementCollection__iterator* QWebElementCollection__iterator_OperatorPlusAssign(QWebElementCollection__iterator* self, int j);
QWebElementCollection__iterator* QWebElementCollection__iterator_OperatorMinusAssign(QWebElementCollection__iterator* self, int j);
QWebElementCollection__iterator* QWebElementCollection__iterator_OperatorPlus(const QWebElementCollection__iterator* self, int j);
QWebElementCollection__iterator* QWebElementCollection__iterator_OperatorMinus(const QWebElementCollection__iterator* self, int j);
int QWebElementCollection__iterator_OperatorMinusWithQWebElementCollectioniterator(const QWebElementCollection__iterator* self, QWebElementCollection__iterator* j);
void QWebElementCollection__iterator_Delete(QWebElementCollection__iterator* self, bool isSubclass);
#ifdef __cplusplus
} /* extern C */
#endif
#endif

623
qt/webkit/gen_qwebframe.cpp Normal file
View File

@ -0,0 +1,623 @@
#include <QByteArray>
#include <QEvent>
#include <QIcon>
#include <QList>
#include <QMetaObject>
#include <QNetworkRequest>
#include <QObject>
#include <QPainter>
#include <QPixmap>
#include <QPoint>
#include <QPrinter>
#include <QRect>
#include <QRegion>
#include <QSize>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QUrl>
#include <QVariant>
#include <QWebElement>
#include <QWebElementCollection>
#include <QWebFrame>
#include <QWebHitTestResult>
#include <QWebPage>
#include <QWebSecurityOrigin>
#include <qwebframe.h>
#include "gen_qwebframe.h"
#include "_cgo_export.h"
void QWebHitTestResult_new(QWebHitTestResult** outptr_QWebHitTestResult) {
QWebHitTestResult* ret = new QWebHitTestResult();
*outptr_QWebHitTestResult = ret;
}
void QWebHitTestResult_new2(QWebHitTestResult* other, QWebHitTestResult** outptr_QWebHitTestResult) {
QWebHitTestResult* ret = new QWebHitTestResult(*other);
*outptr_QWebHitTestResult = ret;
}
void QWebHitTestResult_OperatorAssign(QWebHitTestResult* self, QWebHitTestResult* other) {
self->operator=(*other);
}
bool QWebHitTestResult_IsNull(const QWebHitTestResult* self) {
return self->isNull();
}
QPoint* QWebHitTestResult_Pos(const QWebHitTestResult* self) {
return new QPoint(self->pos());
}
QRect* QWebHitTestResult_BoundingRect(const QWebHitTestResult* self) {
return new QRect(self->boundingRect());
}
QWebElement* QWebHitTestResult_EnclosingBlockElement(const QWebHitTestResult* self) {
return new QWebElement(self->enclosingBlockElement());
}
struct miqt_string QWebHitTestResult_Title(const QWebHitTestResult* 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 QWebHitTestResult_LinkText(const QWebHitTestResult* 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* QWebHitTestResult_LinkUrl(const QWebHitTestResult* self) {
return new QUrl(self->linkUrl());
}
QUrl* QWebHitTestResult_LinkTitle(const QWebHitTestResult* self) {
return new QUrl(self->linkTitle());
}
struct miqt_string QWebHitTestResult_LinkTitleString(const QWebHitTestResult* self) {
QString _ret = self->linkTitleString();
// Convert QString from UTF-16 in C++ RAII memory 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;
}
QWebFrame* QWebHitTestResult_LinkTargetFrame(const QWebHitTestResult* self) {
return self->linkTargetFrame();
}
QWebElement* QWebHitTestResult_LinkElement(const QWebHitTestResult* self) {
return new QWebElement(self->linkElement());
}
struct miqt_string QWebHitTestResult_AlternateText(const QWebHitTestResult* self) {
QString _ret = self->alternateText();
// Convert QString from UTF-16 in C++ RAII memory 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* QWebHitTestResult_ImageUrl(const QWebHitTestResult* self) {
return new QUrl(self->imageUrl());
}
QPixmap* QWebHitTestResult_Pixmap(const QWebHitTestResult* self) {
return new QPixmap(self->pixmap());
}
QUrl* QWebHitTestResult_MediaUrl(const QWebHitTestResult* self) {
return new QUrl(self->mediaUrl());
}
bool QWebHitTestResult_IsContentEditable(const QWebHitTestResult* self) {
return self->isContentEditable();
}
bool QWebHitTestResult_IsContentSelected(const QWebHitTestResult* self) {
return self->isContentSelected();
}
QWebElement* QWebHitTestResult_Element(const QWebHitTestResult* self) {
return new QWebElement(self->element());
}
QWebFrame* QWebHitTestResult_Frame(const QWebHitTestResult* self) {
return self->frame();
}
void QWebHitTestResult_Delete(QWebHitTestResult* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QWebHitTestResult*>( self );
} else {
delete self;
}
}
QMetaObject* QWebFrame_MetaObject(const QWebFrame* self) {
return (QMetaObject*) self->metaObject();
}
void* QWebFrame_Metacast(QWebFrame* self, const char* param1) {
return self->qt_metacast(param1);
}
struct miqt_string QWebFrame_Tr(const char* s) {
QString _ret = QWebFrame::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 QWebFrame_TrUtf8(const char* s) {
QString _ret = QWebFrame::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;
}
QWebPage* QWebFrame_Page(const QWebFrame* self) {
return self->page();
}
void QWebFrame_Load(QWebFrame* self, QUrl* url) {
self->load(*url);
}
void QWebFrame_LoadWithRequest(QWebFrame* self, QNetworkRequest* request) {
self->load(*request);
}
void QWebFrame_SetHtml(QWebFrame* self, struct miqt_string html) {
QString html_QString = QString::fromUtf8(html.data, html.len);
self->setHtml(html_QString);
}
void QWebFrame_SetContent(QWebFrame* self, struct miqt_string data) {
QByteArray data_QByteArray(data.data, data.len);
self->setContent(data_QByteArray);
}
void QWebFrame_AddToJavaScriptWindowObject(QWebFrame* self, struct miqt_string name, QObject* object) {
QString name_QString = QString::fromUtf8(name.data, name.len);
self->addToJavaScriptWindowObject(name_QString, object);
}
struct miqt_string QWebFrame_ToHtml(const QWebFrame* self) {
QString _ret = self->toHtml();
// Convert QString from UTF-16 in C++ RAII memory 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 QWebFrame_ToPlainText(const QWebFrame* self) {
QString _ret = self->toPlainText();
// Convert QString from UTF-16 in C++ RAII memory 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 QWebFrame_Title(const QWebFrame* 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;
}
void QWebFrame_SetUrl(QWebFrame* self, QUrl* url) {
self->setUrl(*url);
}
QUrl* QWebFrame_Url(const QWebFrame* self) {
return new QUrl(self->url());
}
QUrl* QWebFrame_RequestedUrl(const QWebFrame* self) {
return new QUrl(self->requestedUrl());
}
QUrl* QWebFrame_BaseUrl(const QWebFrame* self) {
return new QUrl(self->baseUrl());
}
QIcon* QWebFrame_Icon(const QWebFrame* self) {
return new QIcon(self->icon());
}
struct miqt_string QWebFrame_FrameName(const QWebFrame* self) {
QString _ret = self->frameName();
// Convert QString from UTF-16 in C++ RAII memory 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;
}
QWebFrame* QWebFrame_ParentFrame(const QWebFrame* self) {
return self->parentFrame();
}
struct miqt_array /* of QWebFrame* */ QWebFrame_ChildFrames(const QWebFrame* self) {
QList<QWebFrame *> _ret = self->childFrames();
// Convert QList<> from C++ memory to manually-managed C memory
QWebFrame** _arr = static_cast<QWebFrame**>(malloc(sizeof(QWebFrame*) * _ret.length()));
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
_arr[i] = _ret[i];
}
struct miqt_array _out;
_out.len = _ret.length();
_out.data = static_cast<void*>(_arr);
return _out;
}
int QWebFrame_ScrollBarPolicy(const QWebFrame* self, int orientation) {
Qt::ScrollBarPolicy _ret = self->scrollBarPolicy(static_cast<Qt::Orientation>(orientation));
return static_cast<int>(_ret);
}
void QWebFrame_SetScrollBarPolicy(QWebFrame* self, int orientation, int policy) {
self->setScrollBarPolicy(static_cast<Qt::Orientation>(orientation), static_cast<Qt::ScrollBarPolicy>(policy));
}
void QWebFrame_SetScrollBarValue(QWebFrame* self, int orientation, int value) {
self->setScrollBarValue(static_cast<Qt::Orientation>(orientation), static_cast<int>(value));
}
int QWebFrame_ScrollBarValue(const QWebFrame* self, int orientation) {
return self->scrollBarValue(static_cast<Qt::Orientation>(orientation));
}
int QWebFrame_ScrollBarMinimum(const QWebFrame* self, int orientation) {
return self->scrollBarMinimum(static_cast<Qt::Orientation>(orientation));
}
int QWebFrame_ScrollBarMaximum(const QWebFrame* self, int orientation) {
return self->scrollBarMaximum(static_cast<Qt::Orientation>(orientation));
}
QRect* QWebFrame_ScrollBarGeometry(const QWebFrame* self, int orientation) {
return new QRect(self->scrollBarGeometry(static_cast<Qt::Orientation>(orientation)));
}
void QWebFrame_Scroll(QWebFrame* self, int param1, int param2) {
self->scroll(static_cast<int>(param1), static_cast<int>(param2));
}
QPoint* QWebFrame_ScrollPosition(const QWebFrame* self) {
return new QPoint(self->scrollPosition());
}
void QWebFrame_SetScrollPosition(QWebFrame* self, QPoint* pos) {
self->setScrollPosition(*pos);
}
void QWebFrame_ScrollToAnchor(QWebFrame* self, struct miqt_string anchor) {
QString anchor_QString = QString::fromUtf8(anchor.data, anchor.len);
self->scrollToAnchor(anchor_QString);
}
void QWebFrame_Render(QWebFrame* self, QPainter* param1) {
self->render(param1);
}
void QWebFrame_Render2(QWebFrame* self, QPainter* param1, int layer) {
self->render(param1, static_cast<QWebFrame::RenderLayers>(layer));
}
void QWebFrame_SetTextSizeMultiplier(QWebFrame* self, double factor) {
self->setTextSizeMultiplier(static_cast<qreal>(factor));
}
double QWebFrame_TextSizeMultiplier(const QWebFrame* self) {
qreal _ret = self->textSizeMultiplier();
return static_cast<double>(_ret);
}
double QWebFrame_ZoomFactor(const QWebFrame* self) {
qreal _ret = self->zoomFactor();
return static_cast<double>(_ret);
}
void QWebFrame_SetZoomFactor(QWebFrame* self, double factor) {
self->setZoomFactor(static_cast<qreal>(factor));
}
bool QWebFrame_HasFocus(const QWebFrame* self) {
return self->hasFocus();
}
void QWebFrame_SetFocus(QWebFrame* self) {
self->setFocus();
}
QPoint* QWebFrame_Pos(const QWebFrame* self) {
return new QPoint(self->pos());
}
QRect* QWebFrame_Geometry(const QWebFrame* self) {
return new QRect(self->geometry());
}
QSize* QWebFrame_ContentsSize(const QWebFrame* self) {
return new QSize(self->contentsSize());
}
QWebElement* QWebFrame_DocumentElement(const QWebFrame* self) {
return new QWebElement(self->documentElement());
}
QWebElement* QWebFrame_OwnerElement(const QWebFrame* self) {
return new QWebElement(self->ownerElement());
}
QWebElementCollection* QWebFrame_FindAllElements(const QWebFrame* self, struct miqt_string selectorQuery) {
QString selectorQuery_QString = QString::fromUtf8(selectorQuery.data, selectorQuery.len);
return new QWebElementCollection(self->findAllElements(selectorQuery_QString));
}
QWebElement* QWebFrame_FindFirstElement(const QWebFrame* self, struct miqt_string selectorQuery) {
QString selectorQuery_QString = QString::fromUtf8(selectorQuery.data, selectorQuery.len);
return new QWebElement(self->findFirstElement(selectorQuery_QString));
}
QWebHitTestResult* QWebFrame_HitTestContent(const QWebFrame* self, QPoint* pos) {
return new QWebHitTestResult(self->hitTestContent(*pos));
}
bool QWebFrame_Event(QWebFrame* self, QEvent* param1) {
return self->event(param1);
}
QWebSecurityOrigin* QWebFrame_SecurityOrigin(const QWebFrame* self) {
return new QWebSecurityOrigin(self->securityOrigin());
}
QVariant* QWebFrame_EvaluateJavaScript(QWebFrame* self, struct miqt_string scriptSource) {
QString scriptSource_QString = QString::fromUtf8(scriptSource.data, scriptSource.len);
return new QVariant(self->evaluateJavaScript(scriptSource_QString));
}
void QWebFrame_Print(const QWebFrame* self, QPrinter* printer) {
self->print(printer);
}
void QWebFrame_JavaScriptWindowObjectCleared(QWebFrame* self) {
self->javaScriptWindowObjectCleared();
}
void QWebFrame_connect_JavaScriptWindowObjectCleared(QWebFrame* self, intptr_t slot) {
QWebFrame::connect(self, static_cast<void (QWebFrame::*)()>(&QWebFrame::javaScriptWindowObjectCleared), self, [=]() {
miqt_exec_callback_QWebFrame_JavaScriptWindowObjectCleared(slot);
});
}
void QWebFrame_ProvisionalLoad(QWebFrame* self) {
self->provisionalLoad();
}
void QWebFrame_connect_ProvisionalLoad(QWebFrame* self, intptr_t slot) {
QWebFrame::connect(self, static_cast<void (QWebFrame::*)()>(&QWebFrame::provisionalLoad), self, [=]() {
miqt_exec_callback_QWebFrame_ProvisionalLoad(slot);
});
}
void QWebFrame_TitleChanged(QWebFrame* self, struct miqt_string title) {
QString title_QString = QString::fromUtf8(title.data, title.len);
self->titleChanged(title_QString);
}
void QWebFrame_connect_TitleChanged(QWebFrame* self, intptr_t slot) {
QWebFrame::connect(self, static_cast<void (QWebFrame::*)(const QString&)>(&QWebFrame::titleChanged), self, [=](const QString& title) {
const QString title_ret = title;
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray title_b = title_ret.toUtf8();
struct miqt_string title_ms;
title_ms.len = title_b.length();
title_ms.data = static_cast<char*>(malloc(title_ms.len));
memcpy(title_ms.data, title_b.data(), title_ms.len);
struct miqt_string sigval1 = title_ms;
miqt_exec_callback_QWebFrame_TitleChanged(slot, sigval1);
});
}
void QWebFrame_UrlChanged(QWebFrame* self, QUrl* url) {
self->urlChanged(*url);
}
void QWebFrame_connect_UrlChanged(QWebFrame* self, intptr_t slot) {
QWebFrame::connect(self, static_cast<void (QWebFrame::*)(const QUrl&)>(&QWebFrame::urlChanged), self, [=](const QUrl& url) {
const QUrl& url_ret = url;
// Cast returned reference into pointer
QUrl* sigval1 = const_cast<QUrl*>(&url_ret);
miqt_exec_callback_QWebFrame_UrlChanged(slot, sigval1);
});
}
void QWebFrame_InitialLayoutCompleted(QWebFrame* self) {
self->initialLayoutCompleted();
}
void QWebFrame_connect_InitialLayoutCompleted(QWebFrame* self, intptr_t slot) {
QWebFrame::connect(self, static_cast<void (QWebFrame::*)()>(&QWebFrame::initialLayoutCompleted), self, [=]() {
miqt_exec_callback_QWebFrame_InitialLayoutCompleted(slot);
});
}
void QWebFrame_IconChanged(QWebFrame* self) {
self->iconChanged();
}
void QWebFrame_connect_IconChanged(QWebFrame* self, intptr_t slot) {
QWebFrame::connect(self, static_cast<void (QWebFrame::*)()>(&QWebFrame::iconChanged), self, [=]() {
miqt_exec_callback_QWebFrame_IconChanged(slot);
});
}
void QWebFrame_ContentsSizeChanged(QWebFrame* self, QSize* size) {
self->contentsSizeChanged(*size);
}
void QWebFrame_connect_ContentsSizeChanged(QWebFrame* self, intptr_t slot) {
QWebFrame::connect(self, static_cast<void (QWebFrame::*)(const QSize&)>(&QWebFrame::contentsSizeChanged), self, [=](const QSize& size) {
const QSize& size_ret = size;
// Cast returned reference into pointer
QSize* sigval1 = const_cast<QSize*>(&size_ret);
miqt_exec_callback_QWebFrame_ContentsSizeChanged(slot, sigval1);
});
}
void QWebFrame_LoadStarted(QWebFrame* self) {
self->loadStarted();
}
void QWebFrame_connect_LoadStarted(QWebFrame* self, intptr_t slot) {
QWebFrame::connect(self, static_cast<void (QWebFrame::*)()>(&QWebFrame::loadStarted), self, [=]() {
miqt_exec_callback_QWebFrame_LoadStarted(slot);
});
}
void QWebFrame_LoadFinished(QWebFrame* self, bool ok) {
self->loadFinished(ok);
}
void QWebFrame_connect_LoadFinished(QWebFrame* self, intptr_t slot) {
QWebFrame::connect(self, static_cast<void (QWebFrame::*)(bool)>(&QWebFrame::loadFinished), self, [=](bool ok) {
bool sigval1 = ok;
miqt_exec_callback_QWebFrame_LoadFinished(slot, sigval1);
});
}
void QWebFrame_PageChanged(QWebFrame* self) {
self->pageChanged();
}
void QWebFrame_connect_PageChanged(QWebFrame* self, intptr_t slot) {
QWebFrame::connect(self, static_cast<void (QWebFrame::*)()>(&QWebFrame::pageChanged), self, [=]() {
miqt_exec_callback_QWebFrame_PageChanged(slot);
});
}
struct miqt_string QWebFrame_Tr2(const char* s, const char* c) {
QString _ret = QWebFrame::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 QWebFrame_Tr3(const char* s, const char* c, int n) {
QString _ret = QWebFrame::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 QWebFrame_TrUtf82(const char* s, const char* c) {
QString _ret = QWebFrame::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 QWebFrame_TrUtf83(const char* s, const char* c, int n) {
QString _ret = QWebFrame::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 QWebFrame_Load2(QWebFrame* self, QNetworkRequest* request, int operation) {
self->load(*request, static_cast<QNetworkAccessManager::Operation>(operation));
}
void QWebFrame_Load3(QWebFrame* self, QNetworkRequest* request, int operation, struct miqt_string body) {
QByteArray body_QByteArray(body.data, body.len);
self->load(*request, static_cast<QNetworkAccessManager::Operation>(operation), body_QByteArray);
}
void QWebFrame_SetHtml2(QWebFrame* self, struct miqt_string html, QUrl* baseUrl) {
QString html_QString = QString::fromUtf8(html.data, html.len);
self->setHtml(html_QString, *baseUrl);
}
void QWebFrame_SetContent2(QWebFrame* self, struct miqt_string data, struct miqt_string mimeType) {
QByteArray data_QByteArray(data.data, data.len);
QString mimeType_QString = QString::fromUtf8(mimeType.data, mimeType.len);
self->setContent(data_QByteArray, mimeType_QString);
}
void QWebFrame_SetContent3(QWebFrame* self, struct miqt_string data, struct miqt_string mimeType, QUrl* baseUrl) {
QByteArray data_QByteArray(data.data, data.len);
QString mimeType_QString = QString::fromUtf8(mimeType.data, mimeType.len);
self->setContent(data_QByteArray, mimeType_QString, *baseUrl);
}
void QWebFrame_AddToJavaScriptWindowObject3(QWebFrame* self, struct miqt_string name, QObject* object, int ownership) {
QString name_QString = QString::fromUtf8(name.data, name.len);
self->addToJavaScriptWindowObject(name_QString, object, static_cast<QWebFrame::ValueOwnership>(ownership));
}
void QWebFrame_Render22(QWebFrame* self, QPainter* param1, QRegion* clip) {
self->render(param1, *clip);
}
void QWebFrame_Render3(QWebFrame* self, QPainter* param1, int layer, QRegion* clip) {
self->render(param1, static_cast<QWebFrame::RenderLayers>(layer), *clip);
}

869
qt/webkit/gen_qwebframe.go Normal file
View File

@ -0,0 +1,869 @@
package webkit
/*
#include "gen_qwebframe.h"
#include <stdlib.h>
*/
import "C"
import (
"github.com/mappu/miqt/qt"
"github.com/mappu/miqt/qt/network"
"github.com/mappu/miqt/qt/printsupport"
"runtime"
"runtime/cgo"
"unsafe"
)
type QWebFrame__ValueOwnership int
const (
QWebFrame__QtOwnership QWebFrame__ValueOwnership = 0
QWebFrame__ScriptOwnership QWebFrame__ValueOwnership = 1
QWebFrame__AutoOwnership QWebFrame__ValueOwnership = 2
)
type QWebFrame__RenderLayer int
const (
QWebFrame__ContentsLayer QWebFrame__RenderLayer = 16
QWebFrame__ScrollBarLayer QWebFrame__RenderLayer = 32
QWebFrame__PanIconLayer QWebFrame__RenderLayer = 64
QWebFrame__AllLayers QWebFrame__RenderLayer = 255
)
type QWebHitTestResult struct {
h *C.QWebHitTestResult
isSubclass bool
}
func (this *QWebHitTestResult) cPointer() *C.QWebHitTestResult {
if this == nil {
return nil
}
return this.h
}
func (this *QWebHitTestResult) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
// newQWebHitTestResult constructs the type using only CGO pointers.
func newQWebHitTestResult(h *C.QWebHitTestResult) *QWebHitTestResult {
if h == nil {
return nil
}
return &QWebHitTestResult{h: h}
}
// UnsafeNewQWebHitTestResult constructs the type using only unsafe pointers.
func UnsafeNewQWebHitTestResult(h unsafe.Pointer) *QWebHitTestResult {
if h == nil {
return nil
}
return &QWebHitTestResult{h: (*C.QWebHitTestResult)(h)}
}
// NewQWebHitTestResult constructs a new QWebHitTestResult object.
func NewQWebHitTestResult() *QWebHitTestResult {
var outptr_QWebHitTestResult *C.QWebHitTestResult = nil
C.QWebHitTestResult_new(&outptr_QWebHitTestResult)
ret := newQWebHitTestResult(outptr_QWebHitTestResult)
ret.isSubclass = true
return ret
}
// NewQWebHitTestResult2 constructs a new QWebHitTestResult object.
func NewQWebHitTestResult2(other *QWebHitTestResult) *QWebHitTestResult {
var outptr_QWebHitTestResult *C.QWebHitTestResult = nil
C.QWebHitTestResult_new2(other.cPointer(), &outptr_QWebHitTestResult)
ret := newQWebHitTestResult(outptr_QWebHitTestResult)
ret.isSubclass = true
return ret
}
func (this *QWebHitTestResult) OperatorAssign(other *QWebHitTestResult) {
C.QWebHitTestResult_OperatorAssign(this.h, other.cPointer())
}
func (this *QWebHitTestResult) IsNull() bool {
return (bool)(C.QWebHitTestResult_IsNull(this.h))
}
func (this *QWebHitTestResult) Pos() *qt.QPoint {
_ret := C.QWebHitTestResult_Pos(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 *QWebHitTestResult) BoundingRect() *qt.QRect {
_ret := C.QWebHitTestResult_BoundingRect(this.h)
_goptr := qt.UnsafeNewQRect(unsafe.Pointer(_ret))
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QWebHitTestResult) EnclosingBlockElement() *QWebElement {
_ret := C.QWebHitTestResult_EnclosingBlockElement(this.h)
_goptr := newQWebElement(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QWebHitTestResult) Title() string {
var _ms C.struct_miqt_string = C.QWebHitTestResult_Title(this.h)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QWebHitTestResult) LinkText() string {
var _ms C.struct_miqt_string = C.QWebHitTestResult_LinkText(this.h)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QWebHitTestResult) LinkUrl() *qt.QUrl {
_ret := C.QWebHitTestResult_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 *QWebHitTestResult) LinkTitle() *qt.QUrl {
_ret := C.QWebHitTestResult_LinkTitle(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 *QWebHitTestResult) LinkTitleString() string {
var _ms C.struct_miqt_string = C.QWebHitTestResult_LinkTitleString(this.h)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QWebHitTestResult) LinkTargetFrame() *QWebFrame {
return UnsafeNewQWebFrame(unsafe.Pointer(C.QWebHitTestResult_LinkTargetFrame(this.h)), nil)
}
func (this *QWebHitTestResult) LinkElement() *QWebElement {
_ret := C.QWebHitTestResult_LinkElement(this.h)
_goptr := newQWebElement(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QWebHitTestResult) AlternateText() string {
var _ms C.struct_miqt_string = C.QWebHitTestResult_AlternateText(this.h)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QWebHitTestResult) ImageUrl() *qt.QUrl {
_ret := C.QWebHitTestResult_ImageUrl(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 *QWebHitTestResult) Pixmap() *qt.QPixmap {
_ret := C.QWebHitTestResult_Pixmap(this.h)
_goptr := qt.UnsafeNewQPixmap(unsafe.Pointer(_ret), nil)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QWebHitTestResult) MediaUrl() *qt.QUrl {
_ret := C.QWebHitTestResult_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 *QWebHitTestResult) IsContentEditable() bool {
return (bool)(C.QWebHitTestResult_IsContentEditable(this.h))
}
func (this *QWebHitTestResult) IsContentSelected() bool {
return (bool)(C.QWebHitTestResult_IsContentSelected(this.h))
}
func (this *QWebHitTestResult) Element() *QWebElement {
_ret := C.QWebHitTestResult_Element(this.h)
_goptr := newQWebElement(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QWebHitTestResult) Frame() *QWebFrame {
return UnsafeNewQWebFrame(unsafe.Pointer(C.QWebHitTestResult_Frame(this.h)), nil)
}
// Delete this object from C++ memory.
func (this *QWebHitTestResult) Delete() {
C.QWebHitTestResult_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 *QWebHitTestResult) GoGC() {
runtime.SetFinalizer(this, func(this *QWebHitTestResult) {
this.Delete()
runtime.KeepAlive(this.h)
})
}
type QWebFrame struct {
h *C.QWebFrame
isSubclass bool
*qt.QObject
}
func (this *QWebFrame) cPointer() *C.QWebFrame {
if this == nil {
return nil
}
return this.h
}
func (this *QWebFrame) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
// newQWebFrame constructs the type using only CGO pointers.
func newQWebFrame(h *C.QWebFrame, h_QObject *C.QObject) *QWebFrame {
if h == nil {
return nil
}
return &QWebFrame{h: h,
QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))}
}
// UnsafeNewQWebFrame constructs the type using only unsafe pointers.
func UnsafeNewQWebFrame(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebFrame {
if h == nil {
return nil
}
return &QWebFrame{h: (*C.QWebFrame)(h),
QObject: qt.UnsafeNewQObject(h_QObject)}
}
func (this *QWebFrame) MetaObject() *qt.QMetaObject {
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebFrame_MetaObject(this.h)))
}
func (this *QWebFrame) Metacast(param1 string) unsafe.Pointer {
param1_Cstring := C.CString(param1)
defer C.free(unsafe.Pointer(param1_Cstring))
return (unsafe.Pointer)(C.QWebFrame_Metacast(this.h, param1_Cstring))
}
func QWebFrame_Tr(s string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
var _ms C.struct_miqt_string = C.QWebFrame_Tr(s_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QWebFrame_TrUtf8(s string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
var _ms C.struct_miqt_string = C.QWebFrame_TrUtf8(s_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QWebFrame) Page() *QWebPage {
return UnsafeNewQWebPage(unsafe.Pointer(C.QWebFrame_Page(this.h)), nil)
}
func (this *QWebFrame) Load(url *qt.QUrl) {
C.QWebFrame_Load(this.h, (*C.QUrl)(url.UnsafePointer()))
}
func (this *QWebFrame) LoadWithRequest(request *network.QNetworkRequest) {
C.QWebFrame_LoadWithRequest(this.h, (*C.QNetworkRequest)(request.UnsafePointer()))
}
func (this *QWebFrame) SetHtml(html string) {
html_ms := C.struct_miqt_string{}
html_ms.data = C.CString(html)
html_ms.len = C.size_t(len(html))
defer C.free(unsafe.Pointer(html_ms.data))
C.QWebFrame_SetHtml(this.h, html_ms)
}
func (this *QWebFrame) SetContent(data []byte) {
data_alias := C.struct_miqt_string{}
data_alias.data = (*C.char)(unsafe.Pointer(&data[0]))
data_alias.len = C.size_t(len(data))
C.QWebFrame_SetContent(this.h, data_alias)
}
func (this *QWebFrame) AddToJavaScriptWindowObject(name string, object *qt.QObject) {
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.QWebFrame_AddToJavaScriptWindowObject(this.h, name_ms, (*C.QObject)(object.UnsafePointer()))
}
func (this *QWebFrame) ToHtml() string {
var _ms C.struct_miqt_string = C.QWebFrame_ToHtml(this.h)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QWebFrame) ToPlainText() string {
var _ms C.struct_miqt_string = C.QWebFrame_ToPlainText(this.h)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QWebFrame) Title() string {
var _ms C.struct_miqt_string = C.QWebFrame_Title(this.h)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QWebFrame) SetUrl(url *qt.QUrl) {
C.QWebFrame_SetUrl(this.h, (*C.QUrl)(url.UnsafePointer()))
}
func (this *QWebFrame) Url() *qt.QUrl {
_ret := C.QWebFrame_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 *QWebFrame) RequestedUrl() *qt.QUrl {
_ret := C.QWebFrame_RequestedUrl(this.h)
_goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret))
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QWebFrame) BaseUrl() *qt.QUrl {
_ret := C.QWebFrame_BaseUrl(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 *QWebFrame) Icon() *qt.QIcon {
_ret := C.QWebFrame_Icon(this.h)
_goptr := qt.UnsafeNewQIcon(unsafe.Pointer(_ret))
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QWebFrame) FrameName() string {
var _ms C.struct_miqt_string = C.QWebFrame_FrameName(this.h)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QWebFrame) ParentFrame() *QWebFrame {
return UnsafeNewQWebFrame(unsafe.Pointer(C.QWebFrame_ParentFrame(this.h)), nil)
}
func (this *QWebFrame) ChildFrames() []*QWebFrame {
var _ma C.struct_miqt_array = C.QWebFrame_ChildFrames(this.h)
_ret := make([]*QWebFrame, int(_ma.len))
_outCast := (*[0xffff]*C.QWebFrame)(unsafe.Pointer(_ma.data)) // hey ya
for i := 0; i < int(_ma.len); i++ {
_ret[i] = UnsafeNewQWebFrame(unsafe.Pointer(_outCast[i]), nil)
}
return _ret
}
func (this *QWebFrame) ScrollBarPolicy(orientation qt.Orientation) qt.ScrollBarPolicy {
return (qt.ScrollBarPolicy)(C.QWebFrame_ScrollBarPolicy(this.h, (C.int)(orientation)))
}
func (this *QWebFrame) SetScrollBarPolicy(orientation qt.Orientation, policy qt.ScrollBarPolicy) {
C.QWebFrame_SetScrollBarPolicy(this.h, (C.int)(orientation), (C.int)(policy))
}
func (this *QWebFrame) SetScrollBarValue(orientation qt.Orientation, value int) {
C.QWebFrame_SetScrollBarValue(this.h, (C.int)(orientation), (C.int)(value))
}
func (this *QWebFrame) ScrollBarValue(orientation qt.Orientation) int {
return (int)(C.QWebFrame_ScrollBarValue(this.h, (C.int)(orientation)))
}
func (this *QWebFrame) ScrollBarMinimum(orientation qt.Orientation) int {
return (int)(C.QWebFrame_ScrollBarMinimum(this.h, (C.int)(orientation)))
}
func (this *QWebFrame) ScrollBarMaximum(orientation qt.Orientation) int {
return (int)(C.QWebFrame_ScrollBarMaximum(this.h, (C.int)(orientation)))
}
func (this *QWebFrame) ScrollBarGeometry(orientation qt.Orientation) *qt.QRect {
_ret := C.QWebFrame_ScrollBarGeometry(this.h, (C.int)(orientation))
_goptr := qt.UnsafeNewQRect(unsafe.Pointer(_ret))
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QWebFrame) Scroll(param1 int, param2 int) {
C.QWebFrame_Scroll(this.h, (C.int)(param1), (C.int)(param2))
}
func (this *QWebFrame) ScrollPosition() *qt.QPoint {
_ret := C.QWebFrame_ScrollPosition(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 *QWebFrame) SetScrollPosition(pos *qt.QPoint) {
C.QWebFrame_SetScrollPosition(this.h, (*C.QPoint)(pos.UnsafePointer()))
}
func (this *QWebFrame) ScrollToAnchor(anchor string) {
anchor_ms := C.struct_miqt_string{}
anchor_ms.data = C.CString(anchor)
anchor_ms.len = C.size_t(len(anchor))
defer C.free(unsafe.Pointer(anchor_ms.data))
C.QWebFrame_ScrollToAnchor(this.h, anchor_ms)
}
func (this *QWebFrame) Render(param1 *qt.QPainter) {
C.QWebFrame_Render(this.h, (*C.QPainter)(param1.UnsafePointer()))
}
func (this *QWebFrame) Render2(param1 *qt.QPainter, layer QWebFrame__RenderLayer) {
C.QWebFrame_Render2(this.h, (*C.QPainter)(param1.UnsafePointer()), (C.int)(layer))
}
func (this *QWebFrame) SetTextSizeMultiplier(factor float64) {
C.QWebFrame_SetTextSizeMultiplier(this.h, (C.double)(factor))
}
func (this *QWebFrame) TextSizeMultiplier() float64 {
return (float64)(C.QWebFrame_TextSizeMultiplier(this.h))
}
func (this *QWebFrame) ZoomFactor() float64 {
return (float64)(C.QWebFrame_ZoomFactor(this.h))
}
func (this *QWebFrame) SetZoomFactor(factor float64) {
C.QWebFrame_SetZoomFactor(this.h, (C.double)(factor))
}
func (this *QWebFrame) HasFocus() bool {
return (bool)(C.QWebFrame_HasFocus(this.h))
}
func (this *QWebFrame) SetFocus() {
C.QWebFrame_SetFocus(this.h)
}
func (this *QWebFrame) Pos() *qt.QPoint {
_ret := C.QWebFrame_Pos(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 *QWebFrame) Geometry() *qt.QRect {
_ret := C.QWebFrame_Geometry(this.h)
_goptr := qt.UnsafeNewQRect(unsafe.Pointer(_ret))
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QWebFrame) ContentsSize() *qt.QSize {
_ret := C.QWebFrame_ContentsSize(this.h)
_goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret))
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QWebFrame) DocumentElement() *QWebElement {
_ret := C.QWebFrame_DocumentElement(this.h)
_goptr := newQWebElement(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QWebFrame) OwnerElement() *QWebElement {
_ret := C.QWebFrame_OwnerElement(this.h)
_goptr := newQWebElement(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QWebFrame) FindAllElements(selectorQuery string) *QWebElementCollection {
selectorQuery_ms := C.struct_miqt_string{}
selectorQuery_ms.data = C.CString(selectorQuery)
selectorQuery_ms.len = C.size_t(len(selectorQuery))
defer C.free(unsafe.Pointer(selectorQuery_ms.data))
_ret := C.QWebFrame_FindAllElements(this.h, selectorQuery_ms)
_goptr := newQWebElementCollection(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QWebFrame) FindFirstElement(selectorQuery string) *QWebElement {
selectorQuery_ms := C.struct_miqt_string{}
selectorQuery_ms.data = C.CString(selectorQuery)
selectorQuery_ms.len = C.size_t(len(selectorQuery))
defer C.free(unsafe.Pointer(selectorQuery_ms.data))
_ret := C.QWebFrame_FindFirstElement(this.h, selectorQuery_ms)
_goptr := newQWebElement(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QWebFrame) HitTestContent(pos *qt.QPoint) *QWebHitTestResult {
_ret := C.QWebFrame_HitTestContent(this.h, (*C.QPoint)(pos.UnsafePointer()))
_goptr := newQWebHitTestResult(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QWebFrame) Event(param1 *qt.QEvent) bool {
return (bool)(C.QWebFrame_Event(this.h, (*C.QEvent)(param1.UnsafePointer())))
}
func (this *QWebFrame) SecurityOrigin() *QWebSecurityOrigin {
_ret := C.QWebFrame_SecurityOrigin(this.h)
_goptr := newQWebSecurityOrigin(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QWebFrame) EvaluateJavaScript(scriptSource string) *qt.QVariant {
scriptSource_ms := C.struct_miqt_string{}
scriptSource_ms.data = C.CString(scriptSource)
scriptSource_ms.len = C.size_t(len(scriptSource))
defer C.free(unsafe.Pointer(scriptSource_ms.data))
_ret := C.QWebFrame_EvaluateJavaScript(this.h, scriptSource_ms)
_goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_ret))
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QWebFrame) Print(printer *printsupport.QPrinter) {
C.QWebFrame_Print(this.h, (*C.QPrinter)(printer.UnsafePointer()))
}
func (this *QWebFrame) JavaScriptWindowObjectCleared() {
C.QWebFrame_JavaScriptWindowObjectCleared(this.h)
}
func (this *QWebFrame) OnJavaScriptWindowObjectCleared(slot func()) {
C.QWebFrame_connect_JavaScriptWindowObjectCleared(this.h, C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QWebFrame_JavaScriptWindowObjectCleared
func miqt_exec_callback_QWebFrame_JavaScriptWindowObjectCleared(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 *QWebFrame) ProvisionalLoad() {
C.QWebFrame_ProvisionalLoad(this.h)
}
func (this *QWebFrame) OnProvisionalLoad(slot func()) {
C.QWebFrame_connect_ProvisionalLoad(this.h, C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QWebFrame_ProvisionalLoad
func miqt_exec_callback_QWebFrame_ProvisionalLoad(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 *QWebFrame) TitleChanged(title string) {
title_ms := C.struct_miqt_string{}
title_ms.data = C.CString(title)
title_ms.len = C.size_t(len(title))
defer C.free(unsafe.Pointer(title_ms.data))
C.QWebFrame_TitleChanged(this.h, title_ms)
}
func (this *QWebFrame) OnTitleChanged(slot func(title string)) {
C.QWebFrame_connect_TitleChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QWebFrame_TitleChanged
func miqt_exec_callback_QWebFrame_TitleChanged(cb C.intptr_t, title C.struct_miqt_string) {
gofunc, ok := cgo.Handle(cb).Value().(func(title string))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
var title_ms C.struct_miqt_string = title
title_ret := C.GoStringN(title_ms.data, C.int(int64(title_ms.len)))
C.free(unsafe.Pointer(title_ms.data))
slotval1 := title_ret
gofunc(slotval1)
}
func (this *QWebFrame) UrlChanged(url *qt.QUrl) {
C.QWebFrame_UrlChanged(this.h, (*C.QUrl)(url.UnsafePointer()))
}
func (this *QWebFrame) OnUrlChanged(slot func(url *qt.QUrl)) {
C.QWebFrame_connect_UrlChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QWebFrame_UrlChanged
func miqt_exec_callback_QWebFrame_UrlChanged(cb C.intptr_t, url *C.QUrl) {
gofunc, ok := cgo.Handle(cb).Value().(func(url *qt.QUrl))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := qt.UnsafeNewQUrl(unsafe.Pointer(url))
gofunc(slotval1)
}
func (this *QWebFrame) InitialLayoutCompleted() {
C.QWebFrame_InitialLayoutCompleted(this.h)
}
func (this *QWebFrame) OnInitialLayoutCompleted(slot func()) {
C.QWebFrame_connect_InitialLayoutCompleted(this.h, C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QWebFrame_InitialLayoutCompleted
func miqt_exec_callback_QWebFrame_InitialLayoutCompleted(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 *QWebFrame) IconChanged() {
C.QWebFrame_IconChanged(this.h)
}
func (this *QWebFrame) OnIconChanged(slot func()) {
C.QWebFrame_connect_IconChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QWebFrame_IconChanged
func miqt_exec_callback_QWebFrame_IconChanged(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 *QWebFrame) ContentsSizeChanged(size *qt.QSize) {
C.QWebFrame_ContentsSizeChanged(this.h, (*C.QSize)(size.UnsafePointer()))
}
func (this *QWebFrame) OnContentsSizeChanged(slot func(size *qt.QSize)) {
C.QWebFrame_connect_ContentsSizeChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QWebFrame_ContentsSizeChanged
func miqt_exec_callback_QWebFrame_ContentsSizeChanged(cb C.intptr_t, size *C.QSize) {
gofunc, ok := cgo.Handle(cb).Value().(func(size *qt.QSize))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := qt.UnsafeNewQSize(unsafe.Pointer(size))
gofunc(slotval1)
}
func (this *QWebFrame) LoadStarted() {
C.QWebFrame_LoadStarted(this.h)
}
func (this *QWebFrame) OnLoadStarted(slot func()) {
C.QWebFrame_connect_LoadStarted(this.h, C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QWebFrame_LoadStarted
func miqt_exec_callback_QWebFrame_LoadStarted(cb C.intptr_t) {
gofunc, ok := cgo.Handle(cb).Value().(func())
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
gofunc()
}
func (this *QWebFrame) LoadFinished(ok bool) {
C.QWebFrame_LoadFinished(this.h, (C.bool)(ok))
}
func (this *QWebFrame) OnLoadFinished(slot func(ok bool)) {
C.QWebFrame_connect_LoadFinished(this.h, C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QWebFrame_LoadFinished
func miqt_exec_callback_QWebFrame_LoadFinished(cb C.intptr_t, ok C.bool) {
gofunc, ok := cgo.Handle(cb).Value().(func(ok bool))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := (bool)(ok)
gofunc(slotval1)
}
func (this *QWebFrame) PageChanged() {
C.QWebFrame_PageChanged(this.h)
}
func (this *QWebFrame) OnPageChanged(slot func()) {
C.QWebFrame_connect_PageChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QWebFrame_PageChanged
func miqt_exec_callback_QWebFrame_PageChanged(cb C.intptr_t) {
gofunc, ok := cgo.Handle(cb).Value().(func())
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
gofunc()
}
func QWebFrame_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.QWebFrame_Tr2(s_Cstring, c_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QWebFrame_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.QWebFrame_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 QWebFrame_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.QWebFrame_TrUtf82(s_Cstring, c_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QWebFrame_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.QWebFrame_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 *QWebFrame) Load2(request *network.QNetworkRequest, operation network.QNetworkAccessManager__Operation) {
C.QWebFrame_Load2(this.h, (*C.QNetworkRequest)(request.UnsafePointer()), (C.int)(operation))
}
func (this *QWebFrame) Load3(request *network.QNetworkRequest, operation network.QNetworkAccessManager__Operation, body []byte) {
body_alias := C.struct_miqt_string{}
body_alias.data = (*C.char)(unsafe.Pointer(&body[0]))
body_alias.len = C.size_t(len(body))
C.QWebFrame_Load3(this.h, (*C.QNetworkRequest)(request.UnsafePointer()), (C.int)(operation), body_alias)
}
func (this *QWebFrame) SetHtml2(html string, baseUrl *qt.QUrl) {
html_ms := C.struct_miqt_string{}
html_ms.data = C.CString(html)
html_ms.len = C.size_t(len(html))
defer C.free(unsafe.Pointer(html_ms.data))
C.QWebFrame_SetHtml2(this.h, html_ms, (*C.QUrl)(baseUrl.UnsafePointer()))
}
func (this *QWebFrame) SetContent2(data []byte, mimeType string) {
data_alias := C.struct_miqt_string{}
data_alias.data = (*C.char)(unsafe.Pointer(&data[0]))
data_alias.len = C.size_t(len(data))
mimeType_ms := C.struct_miqt_string{}
mimeType_ms.data = C.CString(mimeType)
mimeType_ms.len = C.size_t(len(mimeType))
defer C.free(unsafe.Pointer(mimeType_ms.data))
C.QWebFrame_SetContent2(this.h, data_alias, mimeType_ms)
}
func (this *QWebFrame) SetContent3(data []byte, mimeType string, baseUrl *qt.QUrl) {
data_alias := C.struct_miqt_string{}
data_alias.data = (*C.char)(unsafe.Pointer(&data[0]))
data_alias.len = C.size_t(len(data))
mimeType_ms := C.struct_miqt_string{}
mimeType_ms.data = C.CString(mimeType)
mimeType_ms.len = C.size_t(len(mimeType))
defer C.free(unsafe.Pointer(mimeType_ms.data))
C.QWebFrame_SetContent3(this.h, data_alias, mimeType_ms, (*C.QUrl)(baseUrl.UnsafePointer()))
}
func (this *QWebFrame) AddToJavaScriptWindowObject3(name string, object *qt.QObject, ownership QWebFrame__ValueOwnership) {
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.QWebFrame_AddToJavaScriptWindowObject3(this.h, name_ms, (*C.QObject)(object.UnsafePointer()), (C.int)(ownership))
}
func (this *QWebFrame) Render22(param1 *qt.QPainter, clip *qt.QRegion) {
C.QWebFrame_Render22(this.h, (*C.QPainter)(param1.UnsafePointer()), (*C.QRegion)(clip.UnsafePointer()))
}
func (this *QWebFrame) Render3(param1 *qt.QPainter, layer QWebFrame__RenderLayer, clip *qt.QRegion) {
C.QWebFrame_Render3(this.h, (*C.QPainter)(param1.UnsafePointer()), (C.int)(layer), (*C.QRegion)(clip.UnsafePointer()))
}

174
qt/webkit/gen_qwebframe.h Normal file
View File

@ -0,0 +1,174 @@
#pragma once
#ifndef MIQT_QT_WEBKIT_GEN_QWEBFRAME_H
#define MIQT_QT_WEBKIT_GEN_QWEBFRAME_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 QEvent;
class QIcon;
class QMetaObject;
class QNetworkRequest;
class QObject;
class QPainter;
class QPixmap;
class QPoint;
class QPrinter;
class QRect;
class QRegion;
class QSize;
class QUrl;
class QVariant;
class QWebElement;
class QWebElementCollection;
class QWebFrame;
class QWebHitTestResult;
class QWebPage;
class QWebSecurityOrigin;
#else
typedef struct QEvent QEvent;
typedef struct QIcon QIcon;
typedef struct QMetaObject QMetaObject;
typedef struct QNetworkRequest QNetworkRequest;
typedef struct QObject QObject;
typedef struct QPainter QPainter;
typedef struct QPixmap QPixmap;
typedef struct QPoint QPoint;
typedef struct QPrinter QPrinter;
typedef struct QRect QRect;
typedef struct QRegion QRegion;
typedef struct QSize QSize;
typedef struct QUrl QUrl;
typedef struct QVariant QVariant;
typedef struct QWebElement QWebElement;
typedef struct QWebElementCollection QWebElementCollection;
typedef struct QWebFrame QWebFrame;
typedef struct QWebHitTestResult QWebHitTestResult;
typedef struct QWebPage QWebPage;
typedef struct QWebSecurityOrigin QWebSecurityOrigin;
#endif
void QWebHitTestResult_new(QWebHitTestResult** outptr_QWebHitTestResult);
void QWebHitTestResult_new2(QWebHitTestResult* other, QWebHitTestResult** outptr_QWebHitTestResult);
void QWebHitTestResult_OperatorAssign(QWebHitTestResult* self, QWebHitTestResult* other);
bool QWebHitTestResult_IsNull(const QWebHitTestResult* self);
QPoint* QWebHitTestResult_Pos(const QWebHitTestResult* self);
QRect* QWebHitTestResult_BoundingRect(const QWebHitTestResult* self);
QWebElement* QWebHitTestResult_EnclosingBlockElement(const QWebHitTestResult* self);
struct miqt_string QWebHitTestResult_Title(const QWebHitTestResult* self);
struct miqt_string QWebHitTestResult_LinkText(const QWebHitTestResult* self);
QUrl* QWebHitTestResult_LinkUrl(const QWebHitTestResult* self);
QUrl* QWebHitTestResult_LinkTitle(const QWebHitTestResult* self);
struct miqt_string QWebHitTestResult_LinkTitleString(const QWebHitTestResult* self);
QWebFrame* QWebHitTestResult_LinkTargetFrame(const QWebHitTestResult* self);
QWebElement* QWebHitTestResult_LinkElement(const QWebHitTestResult* self);
struct miqt_string QWebHitTestResult_AlternateText(const QWebHitTestResult* self);
QUrl* QWebHitTestResult_ImageUrl(const QWebHitTestResult* self);
QPixmap* QWebHitTestResult_Pixmap(const QWebHitTestResult* self);
QUrl* QWebHitTestResult_MediaUrl(const QWebHitTestResult* self);
bool QWebHitTestResult_IsContentEditable(const QWebHitTestResult* self);
bool QWebHitTestResult_IsContentSelected(const QWebHitTestResult* self);
QWebElement* QWebHitTestResult_Element(const QWebHitTestResult* self);
QWebFrame* QWebHitTestResult_Frame(const QWebHitTestResult* self);
void QWebHitTestResult_Delete(QWebHitTestResult* self, bool isSubclass);
QMetaObject* QWebFrame_MetaObject(const QWebFrame* self);
void* QWebFrame_Metacast(QWebFrame* self, const char* param1);
struct miqt_string QWebFrame_Tr(const char* s);
struct miqt_string QWebFrame_TrUtf8(const char* s);
QWebPage* QWebFrame_Page(const QWebFrame* self);
void QWebFrame_Load(QWebFrame* self, QUrl* url);
void QWebFrame_LoadWithRequest(QWebFrame* self, QNetworkRequest* request);
void QWebFrame_SetHtml(QWebFrame* self, struct miqt_string html);
void QWebFrame_SetContent(QWebFrame* self, struct miqt_string data);
void QWebFrame_AddToJavaScriptWindowObject(QWebFrame* self, struct miqt_string name, QObject* object);
struct miqt_string QWebFrame_ToHtml(const QWebFrame* self);
struct miqt_string QWebFrame_ToPlainText(const QWebFrame* self);
struct miqt_string QWebFrame_Title(const QWebFrame* self);
void QWebFrame_SetUrl(QWebFrame* self, QUrl* url);
QUrl* QWebFrame_Url(const QWebFrame* self);
QUrl* QWebFrame_RequestedUrl(const QWebFrame* self);
QUrl* QWebFrame_BaseUrl(const QWebFrame* self);
QIcon* QWebFrame_Icon(const QWebFrame* self);
struct miqt_string QWebFrame_FrameName(const QWebFrame* self);
QWebFrame* QWebFrame_ParentFrame(const QWebFrame* self);
struct miqt_array /* of QWebFrame* */ QWebFrame_ChildFrames(const QWebFrame* self);
int QWebFrame_ScrollBarPolicy(const QWebFrame* self, int orientation);
void QWebFrame_SetScrollBarPolicy(QWebFrame* self, int orientation, int policy);
void QWebFrame_SetScrollBarValue(QWebFrame* self, int orientation, int value);
int QWebFrame_ScrollBarValue(const QWebFrame* self, int orientation);
int QWebFrame_ScrollBarMinimum(const QWebFrame* self, int orientation);
int QWebFrame_ScrollBarMaximum(const QWebFrame* self, int orientation);
QRect* QWebFrame_ScrollBarGeometry(const QWebFrame* self, int orientation);
void QWebFrame_Scroll(QWebFrame* self, int param1, int param2);
QPoint* QWebFrame_ScrollPosition(const QWebFrame* self);
void QWebFrame_SetScrollPosition(QWebFrame* self, QPoint* pos);
void QWebFrame_ScrollToAnchor(QWebFrame* self, struct miqt_string anchor);
void QWebFrame_Render(QWebFrame* self, QPainter* param1);
void QWebFrame_Render2(QWebFrame* self, QPainter* param1, int layer);
void QWebFrame_SetTextSizeMultiplier(QWebFrame* self, double factor);
double QWebFrame_TextSizeMultiplier(const QWebFrame* self);
double QWebFrame_ZoomFactor(const QWebFrame* self);
void QWebFrame_SetZoomFactor(QWebFrame* self, double factor);
bool QWebFrame_HasFocus(const QWebFrame* self);
void QWebFrame_SetFocus(QWebFrame* self);
QPoint* QWebFrame_Pos(const QWebFrame* self);
QRect* QWebFrame_Geometry(const QWebFrame* self);
QSize* QWebFrame_ContentsSize(const QWebFrame* self);
QWebElement* QWebFrame_DocumentElement(const QWebFrame* self);
QWebElement* QWebFrame_OwnerElement(const QWebFrame* self);
QWebElementCollection* QWebFrame_FindAllElements(const QWebFrame* self, struct miqt_string selectorQuery);
QWebElement* QWebFrame_FindFirstElement(const QWebFrame* self, struct miqt_string selectorQuery);
QWebHitTestResult* QWebFrame_HitTestContent(const QWebFrame* self, QPoint* pos);
bool QWebFrame_Event(QWebFrame* self, QEvent* param1);
QWebSecurityOrigin* QWebFrame_SecurityOrigin(const QWebFrame* self);
QVariant* QWebFrame_EvaluateJavaScript(QWebFrame* self, struct miqt_string scriptSource);
void QWebFrame_Print(const QWebFrame* self, QPrinter* printer);
void QWebFrame_JavaScriptWindowObjectCleared(QWebFrame* self);
void QWebFrame_connect_JavaScriptWindowObjectCleared(QWebFrame* self, intptr_t slot);
void QWebFrame_ProvisionalLoad(QWebFrame* self);
void QWebFrame_connect_ProvisionalLoad(QWebFrame* self, intptr_t slot);
void QWebFrame_TitleChanged(QWebFrame* self, struct miqt_string title);
void QWebFrame_connect_TitleChanged(QWebFrame* self, intptr_t slot);
void QWebFrame_UrlChanged(QWebFrame* self, QUrl* url);
void QWebFrame_connect_UrlChanged(QWebFrame* self, intptr_t slot);
void QWebFrame_InitialLayoutCompleted(QWebFrame* self);
void QWebFrame_connect_InitialLayoutCompleted(QWebFrame* self, intptr_t slot);
void QWebFrame_IconChanged(QWebFrame* self);
void QWebFrame_connect_IconChanged(QWebFrame* self, intptr_t slot);
void QWebFrame_ContentsSizeChanged(QWebFrame* self, QSize* size);
void QWebFrame_connect_ContentsSizeChanged(QWebFrame* self, intptr_t slot);
void QWebFrame_LoadStarted(QWebFrame* self);
void QWebFrame_connect_LoadStarted(QWebFrame* self, intptr_t slot);
void QWebFrame_LoadFinished(QWebFrame* self, bool ok);
void QWebFrame_connect_LoadFinished(QWebFrame* self, intptr_t slot);
void QWebFrame_PageChanged(QWebFrame* self);
void QWebFrame_connect_PageChanged(QWebFrame* self, intptr_t slot);
struct miqt_string QWebFrame_Tr2(const char* s, const char* c);
struct miqt_string QWebFrame_Tr3(const char* s, const char* c, int n);
struct miqt_string QWebFrame_TrUtf82(const char* s, const char* c);
struct miqt_string QWebFrame_TrUtf83(const char* s, const char* c, int n);
void QWebFrame_Load2(QWebFrame* self, QNetworkRequest* request, int operation);
void QWebFrame_Load3(QWebFrame* self, QNetworkRequest* request, int operation, struct miqt_string body);
void QWebFrame_SetHtml2(QWebFrame* self, struct miqt_string html, QUrl* baseUrl);
void QWebFrame_SetContent2(QWebFrame* self, struct miqt_string data, struct miqt_string mimeType);
void QWebFrame_SetContent3(QWebFrame* self, struct miqt_string data, struct miqt_string mimeType, QUrl* baseUrl);
void QWebFrame_AddToJavaScriptWindowObject3(QWebFrame* self, struct miqt_string name, QObject* object, int ownership);
void QWebFrame_Render22(QWebFrame* self, QPainter* param1, QRegion* clip);
void QWebFrame_Render3(QWebFrame* self, QPainter* param1, int layer, QRegion* clip);
#ifdef __cplusplus
} /* extern C */
#endif
#endif

View File

@ -0,0 +1,47 @@
#include <QUrl>
#include <QWebElement>
#include <QWebFullScreenRequest>
#include <qwebfullscreenrequest.h>
#include "gen_qwebfullscreenrequest.h"
#include "_cgo_export.h"
void QWebFullScreenRequest_new(QWebFullScreenRequest** outptr_QWebFullScreenRequest) {
QWebFullScreenRequest* ret = new QWebFullScreenRequest();
*outptr_QWebFullScreenRequest = ret;
}
void QWebFullScreenRequest_new2(QWebFullScreenRequest* param1, QWebFullScreenRequest** outptr_QWebFullScreenRequest) {
QWebFullScreenRequest* ret = new QWebFullScreenRequest(*param1);
*outptr_QWebFullScreenRequest = ret;
}
void QWebFullScreenRequest_Accept(QWebFullScreenRequest* self) {
self->accept();
}
void QWebFullScreenRequest_Reject(QWebFullScreenRequest* self) {
self->reject();
}
bool QWebFullScreenRequest_ToggleOn(const QWebFullScreenRequest* self) {
return self->toggleOn();
}
QUrl* QWebFullScreenRequest_Origin(const QWebFullScreenRequest* self) {
return new QUrl(self->origin());
}
QWebElement* QWebFullScreenRequest_Element(const QWebFullScreenRequest* self) {
const QWebElement& _ret = self->element();
// Cast returned reference into pointer
return const_cast<QWebElement*>(&_ret);
}
void QWebFullScreenRequest_Delete(QWebFullScreenRequest* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QWebFullScreenRequest*>( self );
} else {
delete self;
}
}

View File

@ -0,0 +1,108 @@
package webkit
/*
#include "gen_qwebfullscreenrequest.h"
#include <stdlib.h>
*/
import "C"
import (
"github.com/mappu/miqt/qt"
"runtime"
"unsafe"
)
type QWebFullScreenRequest struct {
h *C.QWebFullScreenRequest
isSubclass bool
}
func (this *QWebFullScreenRequest) cPointer() *C.QWebFullScreenRequest {
if this == nil {
return nil
}
return this.h
}
func (this *QWebFullScreenRequest) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
// newQWebFullScreenRequest constructs the type using only CGO pointers.
func newQWebFullScreenRequest(h *C.QWebFullScreenRequest) *QWebFullScreenRequest {
if h == nil {
return nil
}
return &QWebFullScreenRequest{h: h}
}
// UnsafeNewQWebFullScreenRequest constructs the type using only unsafe pointers.
func UnsafeNewQWebFullScreenRequest(h unsafe.Pointer) *QWebFullScreenRequest {
if h == nil {
return nil
}
return &QWebFullScreenRequest{h: (*C.QWebFullScreenRequest)(h)}
}
// NewQWebFullScreenRequest constructs a new QWebFullScreenRequest object.
func NewQWebFullScreenRequest() *QWebFullScreenRequest {
var outptr_QWebFullScreenRequest *C.QWebFullScreenRequest = nil
C.QWebFullScreenRequest_new(&outptr_QWebFullScreenRequest)
ret := newQWebFullScreenRequest(outptr_QWebFullScreenRequest)
ret.isSubclass = true
return ret
}
// NewQWebFullScreenRequest2 constructs a new QWebFullScreenRequest object.
func NewQWebFullScreenRequest2(param1 *QWebFullScreenRequest) *QWebFullScreenRequest {
var outptr_QWebFullScreenRequest *C.QWebFullScreenRequest = nil
C.QWebFullScreenRequest_new2(param1.cPointer(), &outptr_QWebFullScreenRequest)
ret := newQWebFullScreenRequest(outptr_QWebFullScreenRequest)
ret.isSubclass = true
return ret
}
func (this *QWebFullScreenRequest) Accept() {
C.QWebFullScreenRequest_Accept(this.h)
}
func (this *QWebFullScreenRequest) Reject() {
C.QWebFullScreenRequest_Reject(this.h)
}
func (this *QWebFullScreenRequest) ToggleOn() bool {
return (bool)(C.QWebFullScreenRequest_ToggleOn(this.h))
}
func (this *QWebFullScreenRequest) Origin() *qt.QUrl {
_ret := C.QWebFullScreenRequest_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 *QWebFullScreenRequest) Element() *QWebElement {
return UnsafeNewQWebElement(unsafe.Pointer(C.QWebFullScreenRequest_Element(this.h)))
}
// Delete this object from C++ memory.
func (this *QWebFullScreenRequest) Delete() {
C.QWebFullScreenRequest_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 *QWebFullScreenRequest) GoGC() {
runtime.SetFinalizer(this, func(this *QWebFullScreenRequest) {
this.Delete()
runtime.KeepAlive(this.h)
})
}

View File

@ -0,0 +1,40 @@
#pragma once
#ifndef MIQT_QT_WEBKIT_GEN_QWEBFULLSCREENREQUEST_H
#define MIQT_QT_WEBKIT_GEN_QWEBFULLSCREENREQUEST_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 QWebElement;
class QWebFullScreenRequest;
#else
typedef struct QUrl QUrl;
typedef struct QWebElement QWebElement;
typedef struct QWebFullScreenRequest QWebFullScreenRequest;
#endif
void QWebFullScreenRequest_new(QWebFullScreenRequest** outptr_QWebFullScreenRequest);
void QWebFullScreenRequest_new2(QWebFullScreenRequest* param1, QWebFullScreenRequest** outptr_QWebFullScreenRequest);
void QWebFullScreenRequest_Accept(QWebFullScreenRequest* self);
void QWebFullScreenRequest_Reject(QWebFullScreenRequest* self);
bool QWebFullScreenRequest_ToggleOn(const QWebFullScreenRequest* self);
QUrl* QWebFullScreenRequest_Origin(const QWebFullScreenRequest* self);
QWebElement* QWebFullScreenRequest_Element(const QWebFullScreenRequest* self);
void QWebFullScreenRequest_Delete(QWebFullScreenRequest* self, bool isSubclass);
#ifdef __cplusplus
} /* extern C */
#endif
#endif

View File

@ -0,0 +1,238 @@
#include <QDateTime>
#include <QIcon>
#include <QList>
#include <QMap>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QUrl>
#include <QVariant>
#include <QWebHistory>
#include <QWebHistoryItem>
#include <qwebhistory.h>
#include "gen_qwebhistory.h"
#include "_cgo_export.h"
void QWebHistoryItem_new(QWebHistoryItem* other, QWebHistoryItem** outptr_QWebHistoryItem) {
QWebHistoryItem* ret = new QWebHistoryItem(*other);
*outptr_QWebHistoryItem = ret;
}
void QWebHistoryItem_OperatorAssign(QWebHistoryItem* self, QWebHistoryItem* other) {
self->operator=(*other);
}
QUrl* QWebHistoryItem_OriginalUrl(const QWebHistoryItem* self) {
return new QUrl(self->originalUrl());
}
QUrl* QWebHistoryItem_Url(const QWebHistoryItem* self) {
return new QUrl(self->url());
}
struct miqt_string QWebHistoryItem_Title(const QWebHistoryItem* 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* QWebHistoryItem_LastVisited(const QWebHistoryItem* self) {
return new QDateTime(self->lastVisited());
}
QIcon* QWebHistoryItem_Icon(const QWebHistoryItem* self) {
return new QIcon(self->icon());
}
QVariant* QWebHistoryItem_UserData(const QWebHistoryItem* self) {
return new QVariant(self->userData());
}
void QWebHistoryItem_SetUserData(QWebHistoryItem* self, QVariant* userData) {
self->setUserData(*userData);
}
bool QWebHistoryItem_IsValid(const QWebHistoryItem* self) {
return self->isValid();
}
struct miqt_map /* of struct miqt_string to QVariant* */ QWebHistoryItem_ToMap(const QWebHistoryItem* self) {
QVariantMap _ret = self->toMap();
// 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()));
QVariant** _varr = static_cast<QVariant**>(malloc(sizeof(QVariant*) * _ret.size()));
int _ctr = 0;
for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) {
QString _mapkey_ret = _itr->first;
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _mapkey_b = _mapkey_ret.toUtf8();
struct miqt_string _mapkey_ms;
_mapkey_ms.len = _mapkey_b.length();
_mapkey_ms.data = static_cast<char*>(malloc(_mapkey_ms.len));
memcpy(_mapkey_ms.data, _mapkey_b.data(), _mapkey_ms.len);
_karr[_ctr] = _mapkey_ms;
_varr[_ctr] = new QVariant(_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 QWebHistoryItem_LoadFromMap(QWebHistoryItem* self, struct miqt_map /* of struct miqt_string to QVariant* */ mapVal) {
QVariantMap mapVal_QMap;
struct miqt_string* mapVal_karr = static_cast<struct miqt_string*>(mapVal.keys);
QVariant** mapVal_varr = static_cast<QVariant**>(mapVal.values);
for(size_t i = 0; i < mapVal.len; ++i) {
QString mapVal_karr_i_QString = QString::fromUtf8(mapVal_karr[i].data, mapVal_karr[i].len);
mapVal_QMap[mapVal_karr_i_QString] = *(mapVal_varr[i]);
}
self->loadFromMap(mapVal_QMap);
}
void QWebHistoryItem_Delete(QWebHistoryItem* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QWebHistoryItem*>( self );
} else {
delete self;
}
}
void QWebHistory_Clear(QWebHistory* self) {
self->clear();
}
struct miqt_array /* of QWebHistoryItem* */ QWebHistory_Items(const QWebHistory* self) {
QList<QWebHistoryItem> _ret = self->items();
// Convert QList<> from C++ memory to manually-managed C memory
QWebHistoryItem** _arr = static_cast<QWebHistoryItem**>(malloc(sizeof(QWebHistoryItem*) * _ret.length()));
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
_arr[i] = new QWebHistoryItem(_ret[i]);
}
struct miqt_array _out;
_out.len = _ret.length();
_out.data = static_cast<void*>(_arr);
return _out;
}
struct miqt_array /* of QWebHistoryItem* */ QWebHistory_BackItems(const QWebHistory* self, int maxItems) {
QList<QWebHistoryItem> _ret = self->backItems(static_cast<int>(maxItems));
// Convert QList<> from C++ memory to manually-managed C memory
QWebHistoryItem** _arr = static_cast<QWebHistoryItem**>(malloc(sizeof(QWebHistoryItem*) * _ret.length()));
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
_arr[i] = new QWebHistoryItem(_ret[i]);
}
struct miqt_array _out;
_out.len = _ret.length();
_out.data = static_cast<void*>(_arr);
return _out;
}
struct miqt_array /* of QWebHistoryItem* */ QWebHistory_ForwardItems(const QWebHistory* self, int maxItems) {
QList<QWebHistoryItem> _ret = self->forwardItems(static_cast<int>(maxItems));
// Convert QList<> from C++ memory to manually-managed C memory
QWebHistoryItem** _arr = static_cast<QWebHistoryItem**>(malloc(sizeof(QWebHistoryItem*) * _ret.length()));
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
_arr[i] = new QWebHistoryItem(_ret[i]);
}
struct miqt_array _out;
_out.len = _ret.length();
_out.data = static_cast<void*>(_arr);
return _out;
}
bool QWebHistory_CanGoBack(const QWebHistory* self) {
return self->canGoBack();
}
bool QWebHistory_CanGoForward(const QWebHistory* self) {
return self->canGoForward();
}
void QWebHistory_Back(QWebHistory* self) {
self->back();
}
void QWebHistory_Forward(QWebHistory* self) {
self->forward();
}
void QWebHistory_GoToItem(QWebHistory* self, QWebHistoryItem* item) {
self->goToItem(*item);
}
QWebHistoryItem* QWebHistory_BackItem(const QWebHistory* self) {
return new QWebHistoryItem(self->backItem());
}
QWebHistoryItem* QWebHistory_CurrentItem(const QWebHistory* self) {
return new QWebHistoryItem(self->currentItem());
}
QWebHistoryItem* QWebHistory_ForwardItem(const QWebHistory* self) {
return new QWebHistoryItem(self->forwardItem());
}
QWebHistoryItem* QWebHistory_ItemAt(const QWebHistory* self, int i) {
return new QWebHistoryItem(self->itemAt(static_cast<int>(i)));
}
int QWebHistory_CurrentItemIndex(const QWebHistory* self) {
return self->currentItemIndex();
}
int QWebHistory_Count(const QWebHistory* self) {
return self->count();
}
int QWebHistory_MaximumItemCount(const QWebHistory* self) {
return self->maximumItemCount();
}
void QWebHistory_SetMaximumItemCount(QWebHistory* self, int count) {
self->setMaximumItemCount(static_cast<int>(count));
}
struct miqt_map /* of struct miqt_string to QVariant* */ QWebHistory_ToMap(const QWebHistory* self) {
QVariantMap _ret = self->toMap();
// 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()));
QVariant** _varr = static_cast<QVariant**>(malloc(sizeof(QVariant*) * _ret.size()));
int _ctr = 0;
for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) {
QString _mapkey_ret = _itr->first;
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _mapkey_b = _mapkey_ret.toUtf8();
struct miqt_string _mapkey_ms;
_mapkey_ms.len = _mapkey_b.length();
_mapkey_ms.data = static_cast<char*>(malloc(_mapkey_ms.len));
memcpy(_mapkey_ms.data, _mapkey_b.data(), _mapkey_ms.len);
_karr[_ctr] = _mapkey_ms;
_varr[_ctr] = new QVariant(_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 QWebHistory_LoadFromMap(QWebHistory* self, struct miqt_map /* of struct miqt_string to QVariant* */ mapVal) {
QVariantMap mapVal_QMap;
struct miqt_string* mapVal_karr = static_cast<struct miqt_string*>(mapVal.keys);
QVariant** mapVal_varr = static_cast<QVariant**>(mapVal.values);
for(size_t i = 0; i < mapVal.len; ++i) {
QString mapVal_karr_i_QString = QString::fromUtf8(mapVal_karr[i].data, mapVal_karr[i].len);
mapVal_QMap[mapVal_karr_i_QString] = *(mapVal_varr[i]);
}
self->loadFromMap(mapVal_QMap);
}

View File

@ -0,0 +1,358 @@
package webkit
/*
#include "gen_qwebhistory.h"
#include <stdlib.h>
*/
import "C"
import (
"github.com/mappu/miqt/qt"
"runtime"
"unsafe"
)
type QWebHistoryItem struct {
h *C.QWebHistoryItem
isSubclass bool
}
func (this *QWebHistoryItem) cPointer() *C.QWebHistoryItem {
if this == nil {
return nil
}
return this.h
}
func (this *QWebHistoryItem) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
// newQWebHistoryItem constructs the type using only CGO pointers.
func newQWebHistoryItem(h *C.QWebHistoryItem) *QWebHistoryItem {
if h == nil {
return nil
}
return &QWebHistoryItem{h: h}
}
// UnsafeNewQWebHistoryItem constructs the type using only unsafe pointers.
func UnsafeNewQWebHistoryItem(h unsafe.Pointer) *QWebHistoryItem {
if h == nil {
return nil
}
return &QWebHistoryItem{h: (*C.QWebHistoryItem)(h)}
}
// NewQWebHistoryItem constructs a new QWebHistoryItem object.
func NewQWebHistoryItem(other *QWebHistoryItem) *QWebHistoryItem {
var outptr_QWebHistoryItem *C.QWebHistoryItem = nil
C.QWebHistoryItem_new(other.cPointer(), &outptr_QWebHistoryItem)
ret := newQWebHistoryItem(outptr_QWebHistoryItem)
ret.isSubclass = true
return ret
}
func (this *QWebHistoryItem) OperatorAssign(other *QWebHistoryItem) {
C.QWebHistoryItem_OperatorAssign(this.h, other.cPointer())
}
func (this *QWebHistoryItem) OriginalUrl() *qt.QUrl {
_ret := C.QWebHistoryItem_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 *QWebHistoryItem) Url() *qt.QUrl {
_ret := C.QWebHistoryItem_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 *QWebHistoryItem) Title() string {
var _ms C.struct_miqt_string = C.QWebHistoryItem_Title(this.h)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QWebHistoryItem) LastVisited() *qt.QDateTime {
_ret := C.QWebHistoryItem_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 *QWebHistoryItem) Icon() *qt.QIcon {
_ret := C.QWebHistoryItem_Icon(this.h)
_goptr := qt.UnsafeNewQIcon(unsafe.Pointer(_ret))
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QWebHistoryItem) UserData() *qt.QVariant {
_ret := C.QWebHistoryItem_UserData(this.h)
_goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_ret))
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QWebHistoryItem) SetUserData(userData *qt.QVariant) {
C.QWebHistoryItem_SetUserData(this.h, (*C.QVariant)(userData.UnsafePointer()))
}
func (this *QWebHistoryItem) IsValid() bool {
return (bool)(C.QWebHistoryItem_IsValid(this.h))
}
func (this *QWebHistoryItem) ToMap() map[string]qt.QVariant {
var _mm C.struct_miqt_map = C.QWebHistoryItem_ToMap(this.h)
_ret := make(map[string]qt.QVariant, int(_mm.len))
_Keys := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_mm.keys))
_Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(_mm.values))
for i := 0; i < int(_mm.len); i++ {
var _mapkey_ms C.struct_miqt_string = _Keys[i]
_mapkey_ret := C.GoStringN(_mapkey_ms.data, C.int(int64(_mapkey_ms.len)))
C.free(unsafe.Pointer(_mapkey_ms.data))
_entry_Key := _mapkey_ret
_mapval_ret := _Values[i]
_mapval_goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_mapval_ret))
_mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
_entry_Value := *_mapval_goptr
_ret[_entry_Key] = _entry_Value
}
return _ret
}
func (this *QWebHistoryItem) LoadFromMap(mapVal map[string]qt.QVariant) {
mapVal_Keys_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(mapVal))))
defer C.free(unsafe.Pointer(mapVal_Keys_CArray))
mapVal_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(mapVal))))
defer C.free(unsafe.Pointer(mapVal_Values_CArray))
mapVal_ctr := 0
for mapVal_k, mapVal_v := range mapVal {
mapVal_k_ms := C.struct_miqt_string{}
mapVal_k_ms.data = C.CString(mapVal_k)
mapVal_k_ms.len = C.size_t(len(mapVal_k))
defer C.free(unsafe.Pointer(mapVal_k_ms.data))
mapVal_Keys_CArray[mapVal_ctr] = mapVal_k_ms
mapVal_Values_CArray[mapVal_ctr] = (*C.QVariant)(mapVal_v.UnsafePointer())
mapVal_ctr++
}
mapVal_mm := C.struct_miqt_map{
len: C.size_t(len(mapVal)),
keys: unsafe.Pointer(mapVal_Keys_CArray),
values: unsafe.Pointer(mapVal_Values_CArray),
}
C.QWebHistoryItem_LoadFromMap(this.h, mapVal_mm)
}
// Delete this object from C++ memory.
func (this *QWebHistoryItem) Delete() {
C.QWebHistoryItem_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 *QWebHistoryItem) GoGC() {
runtime.SetFinalizer(this, func(this *QWebHistoryItem) {
this.Delete()
runtime.KeepAlive(this.h)
})
}
type QWebHistory struct {
h *C.QWebHistory
isSubclass bool
}
func (this *QWebHistory) cPointer() *C.QWebHistory {
if this == nil {
return nil
}
return this.h
}
func (this *QWebHistory) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
// newQWebHistory constructs the type using only CGO pointers.
func newQWebHistory(h *C.QWebHistory) *QWebHistory {
if h == nil {
return nil
}
return &QWebHistory{h: h}
}
// UnsafeNewQWebHistory constructs the type using only unsafe pointers.
func UnsafeNewQWebHistory(h unsafe.Pointer) *QWebHistory {
if h == nil {
return nil
}
return &QWebHistory{h: (*C.QWebHistory)(h)}
}
func (this *QWebHistory) Clear() {
C.QWebHistory_Clear(this.h)
}
func (this *QWebHistory) Items() []QWebHistoryItem {
var _ma C.struct_miqt_array = C.QWebHistory_Items(this.h)
_ret := make([]QWebHistoryItem, int(_ma.len))
_outCast := (*[0xffff]*C.QWebHistoryItem)(unsafe.Pointer(_ma.data)) // hey ya
for i := 0; i < int(_ma.len); i++ {
_lv_ret := _outCast[i]
_lv_goptr := newQWebHistoryItem(_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 *QWebHistory) BackItems(maxItems int) []QWebHistoryItem {
var _ma C.struct_miqt_array = C.QWebHistory_BackItems(this.h, (C.int)(maxItems))
_ret := make([]QWebHistoryItem, int(_ma.len))
_outCast := (*[0xffff]*C.QWebHistoryItem)(unsafe.Pointer(_ma.data)) // hey ya
for i := 0; i < int(_ma.len); i++ {
_lv_ret := _outCast[i]
_lv_goptr := newQWebHistoryItem(_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 *QWebHistory) ForwardItems(maxItems int) []QWebHistoryItem {
var _ma C.struct_miqt_array = C.QWebHistory_ForwardItems(this.h, (C.int)(maxItems))
_ret := make([]QWebHistoryItem, int(_ma.len))
_outCast := (*[0xffff]*C.QWebHistoryItem)(unsafe.Pointer(_ma.data)) // hey ya
for i := 0; i < int(_ma.len); i++ {
_lv_ret := _outCast[i]
_lv_goptr := newQWebHistoryItem(_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 *QWebHistory) CanGoBack() bool {
return (bool)(C.QWebHistory_CanGoBack(this.h))
}
func (this *QWebHistory) CanGoForward() bool {
return (bool)(C.QWebHistory_CanGoForward(this.h))
}
func (this *QWebHistory) Back() {
C.QWebHistory_Back(this.h)
}
func (this *QWebHistory) Forward() {
C.QWebHistory_Forward(this.h)
}
func (this *QWebHistory) GoToItem(item *QWebHistoryItem) {
C.QWebHistory_GoToItem(this.h, item.cPointer())
}
func (this *QWebHistory) BackItem() *QWebHistoryItem {
_ret := C.QWebHistory_BackItem(this.h)
_goptr := newQWebHistoryItem(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QWebHistory) CurrentItem() *QWebHistoryItem {
_ret := C.QWebHistory_CurrentItem(this.h)
_goptr := newQWebHistoryItem(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QWebHistory) ForwardItem() *QWebHistoryItem {
_ret := C.QWebHistory_ForwardItem(this.h)
_goptr := newQWebHistoryItem(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QWebHistory) ItemAt(i int) *QWebHistoryItem {
_ret := C.QWebHistory_ItemAt(this.h, (C.int)(i))
_goptr := newQWebHistoryItem(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QWebHistory) CurrentItemIndex() int {
return (int)(C.QWebHistory_CurrentItemIndex(this.h))
}
func (this *QWebHistory) Count() int {
return (int)(C.QWebHistory_Count(this.h))
}
func (this *QWebHistory) MaximumItemCount() int {
return (int)(C.QWebHistory_MaximumItemCount(this.h))
}
func (this *QWebHistory) SetMaximumItemCount(count int) {
C.QWebHistory_SetMaximumItemCount(this.h, (C.int)(count))
}
func (this *QWebHistory) ToMap() map[string]qt.QVariant {
var _mm C.struct_miqt_map = C.QWebHistory_ToMap(this.h)
_ret := make(map[string]qt.QVariant, int(_mm.len))
_Keys := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_mm.keys))
_Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(_mm.values))
for i := 0; i < int(_mm.len); i++ {
var _mapkey_ms C.struct_miqt_string = _Keys[i]
_mapkey_ret := C.GoStringN(_mapkey_ms.data, C.int(int64(_mapkey_ms.len)))
C.free(unsafe.Pointer(_mapkey_ms.data))
_entry_Key := _mapkey_ret
_mapval_ret := _Values[i]
_mapval_goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_mapval_ret))
_mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
_entry_Value := *_mapval_goptr
_ret[_entry_Key] = _entry_Value
}
return _ret
}
func (this *QWebHistory) LoadFromMap(mapVal map[string]qt.QVariant) {
mapVal_Keys_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(mapVal))))
defer C.free(unsafe.Pointer(mapVal_Keys_CArray))
mapVal_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(mapVal))))
defer C.free(unsafe.Pointer(mapVal_Values_CArray))
mapVal_ctr := 0
for mapVal_k, mapVal_v := range mapVal {
mapVal_k_ms := C.struct_miqt_string{}
mapVal_k_ms.data = C.CString(mapVal_k)
mapVal_k_ms.len = C.size_t(len(mapVal_k))
defer C.free(unsafe.Pointer(mapVal_k_ms.data))
mapVal_Keys_CArray[mapVal_ctr] = mapVal_k_ms
mapVal_Values_CArray[mapVal_ctr] = (*C.QVariant)(mapVal_v.UnsafePointer())
mapVal_ctr++
}
mapVal_mm := C.struct_miqt_map{
len: C.size_t(len(mapVal)),
keys: unsafe.Pointer(mapVal_Keys_CArray),
values: unsafe.Pointer(mapVal_Values_CArray),
}
C.QWebHistory_LoadFromMap(this.h, mapVal_mm)
}

View File

@ -0,0 +1,71 @@
#pragma once
#ifndef MIQT_QT_WEBKIT_GEN_QWEBHISTORY_H
#define MIQT_QT_WEBKIT_GEN_QWEBHISTORY_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 QIcon;
class QUrl;
class QVariant;
class QWebHistory;
class QWebHistoryItem;
#else
typedef struct QDateTime QDateTime;
typedef struct QIcon QIcon;
typedef struct QUrl QUrl;
typedef struct QVariant QVariant;
typedef struct QWebHistory QWebHistory;
typedef struct QWebHistoryItem QWebHistoryItem;
#endif
void QWebHistoryItem_new(QWebHistoryItem* other, QWebHistoryItem** outptr_QWebHistoryItem);
void QWebHistoryItem_OperatorAssign(QWebHistoryItem* self, QWebHistoryItem* other);
QUrl* QWebHistoryItem_OriginalUrl(const QWebHistoryItem* self);
QUrl* QWebHistoryItem_Url(const QWebHistoryItem* self);
struct miqt_string QWebHistoryItem_Title(const QWebHistoryItem* self);
QDateTime* QWebHistoryItem_LastVisited(const QWebHistoryItem* self);
QIcon* QWebHistoryItem_Icon(const QWebHistoryItem* self);
QVariant* QWebHistoryItem_UserData(const QWebHistoryItem* self);
void QWebHistoryItem_SetUserData(QWebHistoryItem* self, QVariant* userData);
bool QWebHistoryItem_IsValid(const QWebHistoryItem* self);
struct miqt_map /* of struct miqt_string to QVariant* */ QWebHistoryItem_ToMap(const QWebHistoryItem* self);
void QWebHistoryItem_LoadFromMap(QWebHistoryItem* self, struct miqt_map /* of struct miqt_string to QVariant* */ mapVal);
void QWebHistoryItem_Delete(QWebHistoryItem* self, bool isSubclass);
void QWebHistory_Clear(QWebHistory* self);
struct miqt_array /* of QWebHistoryItem* */ QWebHistory_Items(const QWebHistory* self);
struct miqt_array /* of QWebHistoryItem* */ QWebHistory_BackItems(const QWebHistory* self, int maxItems);
struct miqt_array /* of QWebHistoryItem* */ QWebHistory_ForwardItems(const QWebHistory* self, int maxItems);
bool QWebHistory_CanGoBack(const QWebHistory* self);
bool QWebHistory_CanGoForward(const QWebHistory* self);
void QWebHistory_Back(QWebHistory* self);
void QWebHistory_Forward(QWebHistory* self);
void QWebHistory_GoToItem(QWebHistory* self, QWebHistoryItem* item);
QWebHistoryItem* QWebHistory_BackItem(const QWebHistory* self);
QWebHistoryItem* QWebHistory_CurrentItem(const QWebHistory* self);
QWebHistoryItem* QWebHistory_ForwardItem(const QWebHistory* self);
QWebHistoryItem* QWebHistory_ItemAt(const QWebHistory* self, int i);
int QWebHistory_CurrentItemIndex(const QWebHistory* self);
int QWebHistory_Count(const QWebHistory* self);
int QWebHistory_MaximumItemCount(const QWebHistory* self);
void QWebHistory_SetMaximumItemCount(QWebHistory* self, int count);
struct miqt_map /* of struct miqt_string to QVariant* */ QWebHistory_ToMap(const QWebHistory* self);
void QWebHistory_LoadFromMap(QWebHistory* self, struct miqt_map /* of struct miqt_string to QVariant* */ mapVal);
#ifdef __cplusplus
} /* extern C */
#endif
#endif

View File

@ -0,0 +1,417 @@
#include <QChildEvent>
#include <QEvent>
#include <QMetaMethod>
#include <QMetaObject>
#include <QObject>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QTimerEvent>
#include <QWebHistoryInterface>
#include <qwebhistoryinterface.h>
#include "gen_qwebhistoryinterface.h"
#include "_cgo_export.h"
class MiqtVirtualQWebHistoryInterface : public virtual QWebHistoryInterface {
public:
MiqtVirtualQWebHistoryInterface(): QWebHistoryInterface() {};
MiqtVirtualQWebHistoryInterface(QObject* parent): QWebHistoryInterface(parent) {};
virtual ~MiqtVirtualQWebHistoryInterface() = default;
// cgo.Handle value for overwritten implementation
intptr_t handle__HistoryContains = 0;
// Subclass to allow providing a Go implementation
virtual bool historyContains(const QString& url) const override {
if (handle__HistoryContains == 0) {
return false; // Pure virtual, there is no base we can call
}
const QString url_ret = url;
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray url_b = url_ret.toUtf8();
struct miqt_string url_ms;
url_ms.len = url_b.length();
url_ms.data = static_cast<char*>(malloc(url_ms.len));
memcpy(url_ms.data, url_b.data(), url_ms.len);
struct miqt_string sigval1 = url_ms;
bool callback_return_value = miqt_exec_callback_QWebHistoryInterface_HistoryContains(const_cast<MiqtVirtualQWebHistoryInterface*>(this), handle__HistoryContains, sigval1);
return callback_return_value;
}
// cgo.Handle value for overwritten implementation
intptr_t handle__AddHistoryEntry = 0;
// Subclass to allow providing a Go implementation
virtual void addHistoryEntry(const QString& url) override {
if (handle__AddHistoryEntry == 0) {
return; // Pure virtual, there is no base we can call
}
const QString url_ret = url;
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray url_b = url_ret.toUtf8();
struct miqt_string url_ms;
url_ms.len = url_b.length();
url_ms.data = static_cast<char*>(malloc(url_ms.len));
memcpy(url_ms.data, url_b.data(), url_ms.len);
struct miqt_string sigval1 = url_ms;
miqt_exec_callback_QWebHistoryInterface_AddHistoryEntry(this, handle__AddHistoryEntry, 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 QWebHistoryInterface::event(event);
}
QEvent* sigval1 = event;
bool callback_return_value = miqt_exec_callback_QWebHistoryInterface_Event(this, handle__Event, sigval1);
return callback_return_value;
}
// Wrapper to allow calling protected method
bool virtualbase_Event(QEvent* event) {
return QWebHistoryInterface::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 QWebHistoryInterface::eventFilter(watched, event);
}
QObject* sigval1 = watched;
QEvent* sigval2 = event;
bool callback_return_value = miqt_exec_callback_QWebHistoryInterface_EventFilter(this, handle__EventFilter, sigval1, sigval2);
return callback_return_value;
}
// Wrapper to allow calling protected method
bool virtualbase_EventFilter(QObject* watched, QEvent* event) {
return QWebHistoryInterface::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) {
QWebHistoryInterface::timerEvent(event);
return;
}
QTimerEvent* sigval1 = event;
miqt_exec_callback_QWebHistoryInterface_TimerEvent(this, handle__TimerEvent, sigval1);
}
// Wrapper to allow calling protected method
void virtualbase_TimerEvent(QTimerEvent* event) {
QWebHistoryInterface::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) {
QWebHistoryInterface::childEvent(event);
return;
}
QChildEvent* sigval1 = event;
miqt_exec_callback_QWebHistoryInterface_ChildEvent(this, handle__ChildEvent, sigval1);
}
// Wrapper to allow calling protected method
void virtualbase_ChildEvent(QChildEvent* event) {
QWebHistoryInterface::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) {
QWebHistoryInterface::customEvent(event);
return;
}
QEvent* sigval1 = event;
miqt_exec_callback_QWebHistoryInterface_CustomEvent(this, handle__CustomEvent, sigval1);
}
// Wrapper to allow calling protected method
void virtualbase_CustomEvent(QEvent* event) {
QWebHistoryInterface::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) {
QWebHistoryInterface::connectNotify(signal);
return;
}
const QMetaMethod& signal_ret = signal;
// Cast returned reference into pointer
QMetaMethod* sigval1 = const_cast<QMetaMethod*>(&signal_ret);
miqt_exec_callback_QWebHistoryInterface_ConnectNotify(this, handle__ConnectNotify, sigval1);
}
// Wrapper to allow calling protected method
void virtualbase_ConnectNotify(QMetaMethod* signal) {
QWebHistoryInterface::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) {
QWebHistoryInterface::disconnectNotify(signal);
return;
}
const QMetaMethod& signal_ret = signal;
// Cast returned reference into pointer
QMetaMethod* sigval1 = const_cast<QMetaMethod*>(&signal_ret);
miqt_exec_callback_QWebHistoryInterface_DisconnectNotify(this, handle__DisconnectNotify, sigval1);
}
// Wrapper to allow calling protected method
void virtualbase_DisconnectNotify(QMetaMethod* signal) {
QWebHistoryInterface::disconnectNotify(*signal);
}
};
void QWebHistoryInterface_new(QWebHistoryInterface** outptr_QWebHistoryInterface, QObject** outptr_QObject) {
MiqtVirtualQWebHistoryInterface* ret = new MiqtVirtualQWebHistoryInterface();
*outptr_QWebHistoryInterface = ret;
*outptr_QObject = static_cast<QObject*>(ret);
}
void QWebHistoryInterface_new2(QObject* parent, QWebHistoryInterface** outptr_QWebHistoryInterface, QObject** outptr_QObject) {
MiqtVirtualQWebHistoryInterface* ret = new MiqtVirtualQWebHistoryInterface(parent);
*outptr_QWebHistoryInterface = ret;
*outptr_QObject = static_cast<QObject*>(ret);
}
QMetaObject* QWebHistoryInterface_MetaObject(const QWebHistoryInterface* self) {
return (QMetaObject*) self->metaObject();
}
void* QWebHistoryInterface_Metacast(QWebHistoryInterface* self, const char* param1) {
return self->qt_metacast(param1);
}
struct miqt_string QWebHistoryInterface_Tr(const char* s) {
QString _ret = QWebHistoryInterface::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 QWebHistoryInterface_TrUtf8(const char* s) {
QString _ret = QWebHistoryInterface::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 QWebHistoryInterface_SetDefaultInterface(QWebHistoryInterface* defaultInterface) {
QWebHistoryInterface::setDefaultInterface(defaultInterface);
}
QWebHistoryInterface* QWebHistoryInterface_DefaultInterface() {
return QWebHistoryInterface::defaultInterface();
}
bool QWebHistoryInterface_HistoryContains(const QWebHistoryInterface* self, struct miqt_string url) {
QString url_QString = QString::fromUtf8(url.data, url.len);
return self->historyContains(url_QString);
}
void QWebHistoryInterface_AddHistoryEntry(QWebHistoryInterface* self, struct miqt_string url) {
QString url_QString = QString::fromUtf8(url.data, url.len);
self->addHistoryEntry(url_QString);
}
struct miqt_string QWebHistoryInterface_Tr2(const char* s, const char* c) {
QString _ret = QWebHistoryInterface::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 QWebHistoryInterface_Tr3(const char* s, const char* c, int n) {
QString _ret = QWebHistoryInterface::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 QWebHistoryInterface_TrUtf82(const char* s, const char* c) {
QString _ret = QWebHistoryInterface::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 QWebHistoryInterface_TrUtf83(const char* s, const char* c, int n) {
QString _ret = QWebHistoryInterface::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 QWebHistoryInterface_override_virtual_HistoryContains(void* self, intptr_t slot) {
dynamic_cast<MiqtVirtualQWebHistoryInterface*>( (QWebHistoryInterface*)(self) )->handle__HistoryContains = slot;
}
void QWebHistoryInterface_override_virtual_AddHistoryEntry(void* self, intptr_t slot) {
dynamic_cast<MiqtVirtualQWebHistoryInterface*>( (QWebHistoryInterface*)(self) )->handle__AddHistoryEntry = slot;
}
void QWebHistoryInterface_override_virtual_Event(void* self, intptr_t slot) {
dynamic_cast<MiqtVirtualQWebHistoryInterface*>( (QWebHistoryInterface*)(self) )->handle__Event = slot;
}
bool QWebHistoryInterface_virtualbase_Event(void* self, QEvent* event) {
return ( (MiqtVirtualQWebHistoryInterface*)(self) )->virtualbase_Event(event);
}
void QWebHistoryInterface_override_virtual_EventFilter(void* self, intptr_t slot) {
dynamic_cast<MiqtVirtualQWebHistoryInterface*>( (QWebHistoryInterface*)(self) )->handle__EventFilter = slot;
}
bool QWebHistoryInterface_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) {
return ( (MiqtVirtualQWebHistoryInterface*)(self) )->virtualbase_EventFilter(watched, event);
}
void QWebHistoryInterface_override_virtual_TimerEvent(void* self, intptr_t slot) {
dynamic_cast<MiqtVirtualQWebHistoryInterface*>( (QWebHistoryInterface*)(self) )->handle__TimerEvent = slot;
}
void QWebHistoryInterface_virtualbase_TimerEvent(void* self, QTimerEvent* event) {
( (MiqtVirtualQWebHistoryInterface*)(self) )->virtualbase_TimerEvent(event);
}
void QWebHistoryInterface_override_virtual_ChildEvent(void* self, intptr_t slot) {
dynamic_cast<MiqtVirtualQWebHistoryInterface*>( (QWebHistoryInterface*)(self) )->handle__ChildEvent = slot;
}
void QWebHistoryInterface_virtualbase_ChildEvent(void* self, QChildEvent* event) {
( (MiqtVirtualQWebHistoryInterface*)(self) )->virtualbase_ChildEvent(event);
}
void QWebHistoryInterface_override_virtual_CustomEvent(void* self, intptr_t slot) {
dynamic_cast<MiqtVirtualQWebHistoryInterface*>( (QWebHistoryInterface*)(self) )->handle__CustomEvent = slot;
}
void QWebHistoryInterface_virtualbase_CustomEvent(void* self, QEvent* event) {
( (MiqtVirtualQWebHistoryInterface*)(self) )->virtualbase_CustomEvent(event);
}
void QWebHistoryInterface_override_virtual_ConnectNotify(void* self, intptr_t slot) {
dynamic_cast<MiqtVirtualQWebHistoryInterface*>( (QWebHistoryInterface*)(self) )->handle__ConnectNotify = slot;
}
void QWebHistoryInterface_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) {
( (MiqtVirtualQWebHistoryInterface*)(self) )->virtualbase_ConnectNotify(signal);
}
void QWebHistoryInterface_override_virtual_DisconnectNotify(void* self, intptr_t slot) {
dynamic_cast<MiqtVirtualQWebHistoryInterface*>( (QWebHistoryInterface*)(self) )->handle__DisconnectNotify = slot;
}
void QWebHistoryInterface_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) {
( (MiqtVirtualQWebHistoryInterface*)(self) )->virtualbase_DisconnectNotify(signal);
}
void QWebHistoryInterface_Delete(QWebHistoryInterface* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<MiqtVirtualQWebHistoryInterface*>( self );
} else {
delete self;
}
}

View File

@ -0,0 +1,395 @@
package webkit
/*
#include "gen_qwebhistoryinterface.h"
#include <stdlib.h>
*/
import "C"
import (
"github.com/mappu/miqt/qt"
"runtime"
"runtime/cgo"
"unsafe"
)
type QWebHistoryInterface struct {
h *C.QWebHistoryInterface
isSubclass bool
*qt.QObject
}
func (this *QWebHistoryInterface) cPointer() *C.QWebHistoryInterface {
if this == nil {
return nil
}
return this.h
}
func (this *QWebHistoryInterface) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
// newQWebHistoryInterface constructs the type using only CGO pointers.
func newQWebHistoryInterface(h *C.QWebHistoryInterface, h_QObject *C.QObject) *QWebHistoryInterface {
if h == nil {
return nil
}
return &QWebHistoryInterface{h: h,
QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))}
}
// UnsafeNewQWebHistoryInterface constructs the type using only unsafe pointers.
func UnsafeNewQWebHistoryInterface(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebHistoryInterface {
if h == nil {
return nil
}
return &QWebHistoryInterface{h: (*C.QWebHistoryInterface)(h),
QObject: qt.UnsafeNewQObject(h_QObject)}
}
// NewQWebHistoryInterface constructs a new QWebHistoryInterface object.
func NewQWebHistoryInterface() *QWebHistoryInterface {
var outptr_QWebHistoryInterface *C.QWebHistoryInterface = nil
var outptr_QObject *C.QObject = nil
C.QWebHistoryInterface_new(&outptr_QWebHistoryInterface, &outptr_QObject)
ret := newQWebHistoryInterface(outptr_QWebHistoryInterface, outptr_QObject)
ret.isSubclass = true
return ret
}
// NewQWebHistoryInterface2 constructs a new QWebHistoryInterface object.
func NewQWebHistoryInterface2(parent *qt.QObject) *QWebHistoryInterface {
var outptr_QWebHistoryInterface *C.QWebHistoryInterface = nil
var outptr_QObject *C.QObject = nil
C.QWebHistoryInterface_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QWebHistoryInterface, &outptr_QObject)
ret := newQWebHistoryInterface(outptr_QWebHistoryInterface, outptr_QObject)
ret.isSubclass = true
return ret
}
func (this *QWebHistoryInterface) MetaObject() *qt.QMetaObject {
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebHistoryInterface_MetaObject(this.h)))
}
func (this *QWebHistoryInterface) Metacast(param1 string) unsafe.Pointer {
param1_Cstring := C.CString(param1)
defer C.free(unsafe.Pointer(param1_Cstring))
return (unsafe.Pointer)(C.QWebHistoryInterface_Metacast(this.h, param1_Cstring))
}
func QWebHistoryInterface_Tr(s string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
var _ms C.struct_miqt_string = C.QWebHistoryInterface_Tr(s_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QWebHistoryInterface_TrUtf8(s string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
var _ms C.struct_miqt_string = C.QWebHistoryInterface_TrUtf8(s_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QWebHistoryInterface_SetDefaultInterface(defaultInterface *QWebHistoryInterface) {
C.QWebHistoryInterface_SetDefaultInterface(defaultInterface.cPointer())
}
func QWebHistoryInterface_DefaultInterface() *QWebHistoryInterface {
return UnsafeNewQWebHistoryInterface(unsafe.Pointer(C.QWebHistoryInterface_DefaultInterface()), nil)
}
func (this *QWebHistoryInterface) HistoryContains(url string) bool {
url_ms := C.struct_miqt_string{}
url_ms.data = C.CString(url)
url_ms.len = C.size_t(len(url))
defer C.free(unsafe.Pointer(url_ms.data))
return (bool)(C.QWebHistoryInterface_HistoryContains(this.h, url_ms))
}
func (this *QWebHistoryInterface) AddHistoryEntry(url string) {
url_ms := C.struct_miqt_string{}
url_ms.data = C.CString(url)
url_ms.len = C.size_t(len(url))
defer C.free(unsafe.Pointer(url_ms.data))
C.QWebHistoryInterface_AddHistoryEntry(this.h, url_ms)
}
func QWebHistoryInterface_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.QWebHistoryInterface_Tr2(s_Cstring, c_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QWebHistoryInterface_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.QWebHistoryInterface_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 QWebHistoryInterface_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.QWebHistoryInterface_TrUtf82(s_Cstring, c_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QWebHistoryInterface_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.QWebHistoryInterface_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 *QWebHistoryInterface) OnHistoryContains(slot func(url string) bool) {
C.QWebHistoryInterface_override_virtual_HistoryContains(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QWebHistoryInterface_HistoryContains
func miqt_exec_callback_QWebHistoryInterface_HistoryContains(self *C.QWebHistoryInterface, cb C.intptr_t, url C.struct_miqt_string) C.bool {
gofunc, ok := cgo.Handle(cb).Value().(func(url string) bool)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
var url_ms C.struct_miqt_string = url
url_ret := C.GoStringN(url_ms.data, C.int(int64(url_ms.len)))
C.free(unsafe.Pointer(url_ms.data))
slotval1 := url_ret
virtualReturn := gofunc(slotval1)
return (C.bool)(virtualReturn)
}
func (this *QWebHistoryInterface) OnAddHistoryEntry(slot func(url string)) {
C.QWebHistoryInterface_override_virtual_AddHistoryEntry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QWebHistoryInterface_AddHistoryEntry
func miqt_exec_callback_QWebHistoryInterface_AddHistoryEntry(self *C.QWebHistoryInterface, cb C.intptr_t, url C.struct_miqt_string) {
gofunc, ok := cgo.Handle(cb).Value().(func(url string))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
var url_ms C.struct_miqt_string = url
url_ret := C.GoStringN(url_ms.data, C.int(int64(url_ms.len)))
C.free(unsafe.Pointer(url_ms.data))
slotval1 := url_ret
gofunc(slotval1)
}
func (this *QWebHistoryInterface) callVirtualBase_Event(event *qt.QEvent) bool {
return (bool)(C.QWebHistoryInterface_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())))
}
func (this *QWebHistoryInterface) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) {
C.QWebHistoryInterface_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QWebHistoryInterface_Event
func miqt_exec_callback_QWebHistoryInterface_Event(self *C.QWebHistoryInterface, 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((&QWebHistoryInterface{h: self}).callVirtualBase_Event, slotval1)
return (C.bool)(virtualReturn)
}
func (this *QWebHistoryInterface) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool {
return (bool)(C.QWebHistoryInterface_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer())))
}
func (this *QWebHistoryInterface) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) {
C.QWebHistoryInterface_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QWebHistoryInterface_EventFilter
func miqt_exec_callback_QWebHistoryInterface_EventFilter(self *C.QWebHistoryInterface, 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((&QWebHistoryInterface{h: self}).callVirtualBase_EventFilter, slotval1, slotval2)
return (C.bool)(virtualReturn)
}
func (this *QWebHistoryInterface) callVirtualBase_TimerEvent(event *qt.QTimerEvent) {
C.QWebHistoryInterface_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer()))
}
func (this *QWebHistoryInterface) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) {
C.QWebHistoryInterface_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QWebHistoryInterface_TimerEvent
func miqt_exec_callback_QWebHistoryInterface_TimerEvent(self *C.QWebHistoryInterface, 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((&QWebHistoryInterface{h: self}).callVirtualBase_TimerEvent, slotval1)
}
func (this *QWebHistoryInterface) callVirtualBase_ChildEvent(event *qt.QChildEvent) {
C.QWebHistoryInterface_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer()))
}
func (this *QWebHistoryInterface) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) {
C.QWebHistoryInterface_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QWebHistoryInterface_ChildEvent
func miqt_exec_callback_QWebHistoryInterface_ChildEvent(self *C.QWebHistoryInterface, 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((&QWebHistoryInterface{h: self}).callVirtualBase_ChildEvent, slotval1)
}
func (this *QWebHistoryInterface) callVirtualBase_CustomEvent(event *qt.QEvent) {
C.QWebHistoryInterface_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))
}
func (this *QWebHistoryInterface) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) {
C.QWebHistoryInterface_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QWebHistoryInterface_CustomEvent
func miqt_exec_callback_QWebHistoryInterface_CustomEvent(self *C.QWebHistoryInterface, 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((&QWebHistoryInterface{h: self}).callVirtualBase_CustomEvent, slotval1)
}
func (this *QWebHistoryInterface) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) {
C.QWebHistoryInterface_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer()))
}
func (this *QWebHistoryInterface) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) {
C.QWebHistoryInterface_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QWebHistoryInterface_ConnectNotify
func miqt_exec_callback_QWebHistoryInterface_ConnectNotify(self *C.QWebHistoryInterface, 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((&QWebHistoryInterface{h: self}).callVirtualBase_ConnectNotify, slotval1)
}
func (this *QWebHistoryInterface) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) {
C.QWebHistoryInterface_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer()))
}
func (this *QWebHistoryInterface) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) {
C.QWebHistoryInterface_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QWebHistoryInterface_DisconnectNotify
func miqt_exec_callback_QWebHistoryInterface_DisconnectNotify(self *C.QWebHistoryInterface, 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((&QWebHistoryInterface{h: self}).callVirtualBase_DisconnectNotify, slotval1)
}
// Delete this object from C++ memory.
func (this *QWebHistoryInterface) Delete() {
C.QWebHistoryInterface_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 *QWebHistoryInterface) GoGC() {
runtime.SetFinalizer(this, func(this *QWebHistoryInterface) {
this.Delete()
runtime.KeepAlive(this.h)
})
}

View File

@ -0,0 +1,73 @@
#pragma once
#ifndef MIQT_QT_WEBKIT_GEN_QWEBHISTORYINTERFACE_H
#define MIQT_QT_WEBKIT_GEN_QWEBHISTORYINTERFACE_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 QWebHistoryInterface;
#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 QWebHistoryInterface QWebHistoryInterface;
#endif
void QWebHistoryInterface_new(QWebHistoryInterface** outptr_QWebHistoryInterface, QObject** outptr_QObject);
void QWebHistoryInterface_new2(QObject* parent, QWebHistoryInterface** outptr_QWebHistoryInterface, QObject** outptr_QObject);
QMetaObject* QWebHistoryInterface_MetaObject(const QWebHistoryInterface* self);
void* QWebHistoryInterface_Metacast(QWebHistoryInterface* self, const char* param1);
struct miqt_string QWebHistoryInterface_Tr(const char* s);
struct miqt_string QWebHistoryInterface_TrUtf8(const char* s);
void QWebHistoryInterface_SetDefaultInterface(QWebHistoryInterface* defaultInterface);
QWebHistoryInterface* QWebHistoryInterface_DefaultInterface();
bool QWebHistoryInterface_HistoryContains(const QWebHistoryInterface* self, struct miqt_string url);
void QWebHistoryInterface_AddHistoryEntry(QWebHistoryInterface* self, struct miqt_string url);
struct miqt_string QWebHistoryInterface_Tr2(const char* s, const char* c);
struct miqt_string QWebHistoryInterface_Tr3(const char* s, const char* c, int n);
struct miqt_string QWebHistoryInterface_TrUtf82(const char* s, const char* c);
struct miqt_string QWebHistoryInterface_TrUtf83(const char* s, const char* c, int n);
void QWebHistoryInterface_override_virtual_HistoryContains(void* self, intptr_t slot);
bool QWebHistoryInterface_virtualbase_HistoryContains(const void* self, struct miqt_string url);
void QWebHistoryInterface_override_virtual_AddHistoryEntry(void* self, intptr_t slot);
void QWebHistoryInterface_virtualbase_AddHistoryEntry(void* self, struct miqt_string url);
void QWebHistoryInterface_override_virtual_Event(void* self, intptr_t slot);
bool QWebHistoryInterface_virtualbase_Event(void* self, QEvent* event);
void QWebHistoryInterface_override_virtual_EventFilter(void* self, intptr_t slot);
bool QWebHistoryInterface_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event);
void QWebHistoryInterface_override_virtual_TimerEvent(void* self, intptr_t slot);
void QWebHistoryInterface_virtualbase_TimerEvent(void* self, QTimerEvent* event);
void QWebHistoryInterface_override_virtual_ChildEvent(void* self, intptr_t slot);
void QWebHistoryInterface_virtualbase_ChildEvent(void* self, QChildEvent* event);
void QWebHistoryInterface_override_virtual_CustomEvent(void* self, intptr_t slot);
void QWebHistoryInterface_virtualbase_CustomEvent(void* self, QEvent* event);
void QWebHistoryInterface_override_virtual_ConnectNotify(void* self, intptr_t slot);
void QWebHistoryInterface_virtualbase_ConnectNotify(void* self, QMetaMethod* signal);
void QWebHistoryInterface_override_virtual_DisconnectNotify(void* self, intptr_t slot);
void QWebHistoryInterface_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal);
void QWebHistoryInterface_Delete(QWebHistoryInterface* 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,187 @@
#pragma once
#ifndef MIQT_QT_WEBKIT_GEN_QWEBINSPECTOR_H
#define MIQT_QT_WEBKIT_GEN_QWEBINSPECTOR_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 QActionEvent;
class QCloseEvent;
class QContextMenuEvent;
class QDragEnterEvent;
class QDragLeaveEvent;
class QDragMoveEvent;
class QDropEvent;
class QEvent;
class QFocusEvent;
class QHideEvent;
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 QVariant;
class QWebInspector;
class QWebPage;
class QWheelEvent;
class QWidget;
#else
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 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 QVariant QVariant;
typedef struct QWebInspector QWebInspector;
typedef struct QWebPage QWebPage;
typedef struct QWheelEvent QWheelEvent;
typedef struct QWidget QWidget;
#endif
void QWebInspector_new(QWidget* parent, QWebInspector** outptr_QWebInspector, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice);
void QWebInspector_new2(QWebInspector** outptr_QWebInspector, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice);
QMetaObject* QWebInspector_MetaObject(const QWebInspector* self);
void* QWebInspector_Metacast(QWebInspector* self, const char* param1);
struct miqt_string QWebInspector_Tr(const char* s);
struct miqt_string QWebInspector_TrUtf8(const char* s);
void QWebInspector_SetPage(QWebInspector* self, QWebPage* page);
QWebPage* QWebInspector_Page(const QWebInspector* self);
QSize* QWebInspector_SizeHint(const QWebInspector* self);
bool QWebInspector_Event(QWebInspector* self, QEvent* param1);
void QWebInspector_ResizeEvent(QWebInspector* self, QResizeEvent* event);
void QWebInspector_ShowEvent(QWebInspector* self, QShowEvent* event);
void QWebInspector_HideEvent(QWebInspector* self, QHideEvent* event);
void QWebInspector_CloseEvent(QWebInspector* self, QCloseEvent* event);
struct miqt_string QWebInspector_Tr2(const char* s, const char* c);
struct miqt_string QWebInspector_Tr3(const char* s, const char* c, int n);
struct miqt_string QWebInspector_TrUtf82(const char* s, const char* c);
struct miqt_string QWebInspector_TrUtf83(const char* s, const char* c, int n);
void QWebInspector_override_virtual_SizeHint(void* self, intptr_t slot);
QSize* QWebInspector_virtualbase_SizeHint(const void* self);
void QWebInspector_override_virtual_Event(void* self, intptr_t slot);
bool QWebInspector_virtualbase_Event(void* self, QEvent* param1);
void QWebInspector_override_virtual_ResizeEvent(void* self, intptr_t slot);
void QWebInspector_virtualbase_ResizeEvent(void* self, QResizeEvent* event);
void QWebInspector_override_virtual_ShowEvent(void* self, intptr_t slot);
void QWebInspector_virtualbase_ShowEvent(void* self, QShowEvent* event);
void QWebInspector_override_virtual_HideEvent(void* self, intptr_t slot);
void QWebInspector_virtualbase_HideEvent(void* self, QHideEvent* event);
void QWebInspector_override_virtual_CloseEvent(void* self, intptr_t slot);
void QWebInspector_virtualbase_CloseEvent(void* self, QCloseEvent* event);
void QWebInspector_override_virtual_DevType(void* self, intptr_t slot);
int QWebInspector_virtualbase_DevType(const void* self);
void QWebInspector_override_virtual_SetVisible(void* self, intptr_t slot);
void QWebInspector_virtualbase_SetVisible(void* self, bool visible);
void QWebInspector_override_virtual_MinimumSizeHint(void* self, intptr_t slot);
QSize* QWebInspector_virtualbase_MinimumSizeHint(const void* self);
void QWebInspector_override_virtual_HeightForWidth(void* self, intptr_t slot);
int QWebInspector_virtualbase_HeightForWidth(const void* self, int param1);
void QWebInspector_override_virtual_HasHeightForWidth(void* self, intptr_t slot);
bool QWebInspector_virtualbase_HasHeightForWidth(const void* self);
void QWebInspector_override_virtual_PaintEngine(void* self, intptr_t slot);
QPaintEngine* QWebInspector_virtualbase_PaintEngine(const void* self);
void QWebInspector_override_virtual_MousePressEvent(void* self, intptr_t slot);
void QWebInspector_virtualbase_MousePressEvent(void* self, QMouseEvent* event);
void QWebInspector_override_virtual_MouseReleaseEvent(void* self, intptr_t slot);
void QWebInspector_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event);
void QWebInspector_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot);
void QWebInspector_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event);
void QWebInspector_override_virtual_MouseMoveEvent(void* self, intptr_t slot);
void QWebInspector_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event);
void QWebInspector_override_virtual_WheelEvent(void* self, intptr_t slot);
void QWebInspector_virtualbase_WheelEvent(void* self, QWheelEvent* event);
void QWebInspector_override_virtual_KeyPressEvent(void* self, intptr_t slot);
void QWebInspector_virtualbase_KeyPressEvent(void* self, QKeyEvent* event);
void QWebInspector_override_virtual_KeyReleaseEvent(void* self, intptr_t slot);
void QWebInspector_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event);
void QWebInspector_override_virtual_FocusInEvent(void* self, intptr_t slot);
void QWebInspector_virtualbase_FocusInEvent(void* self, QFocusEvent* event);
void QWebInspector_override_virtual_FocusOutEvent(void* self, intptr_t slot);
void QWebInspector_virtualbase_FocusOutEvent(void* self, QFocusEvent* event);
void QWebInspector_override_virtual_EnterEvent(void* self, intptr_t slot);
void QWebInspector_virtualbase_EnterEvent(void* self, QEvent* event);
void QWebInspector_override_virtual_LeaveEvent(void* self, intptr_t slot);
void QWebInspector_virtualbase_LeaveEvent(void* self, QEvent* event);
void QWebInspector_override_virtual_PaintEvent(void* self, intptr_t slot);
void QWebInspector_virtualbase_PaintEvent(void* self, QPaintEvent* event);
void QWebInspector_override_virtual_MoveEvent(void* self, intptr_t slot);
void QWebInspector_virtualbase_MoveEvent(void* self, QMoveEvent* event);
void QWebInspector_override_virtual_ContextMenuEvent(void* self, intptr_t slot);
void QWebInspector_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event);
void QWebInspector_override_virtual_TabletEvent(void* self, intptr_t slot);
void QWebInspector_virtualbase_TabletEvent(void* self, QTabletEvent* event);
void QWebInspector_override_virtual_ActionEvent(void* self, intptr_t slot);
void QWebInspector_virtualbase_ActionEvent(void* self, QActionEvent* event);
void QWebInspector_override_virtual_DragEnterEvent(void* self, intptr_t slot);
void QWebInspector_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event);
void QWebInspector_override_virtual_DragMoveEvent(void* self, intptr_t slot);
void QWebInspector_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event);
void QWebInspector_override_virtual_DragLeaveEvent(void* self, intptr_t slot);
void QWebInspector_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event);
void QWebInspector_override_virtual_DropEvent(void* self, intptr_t slot);
void QWebInspector_virtualbase_DropEvent(void* self, QDropEvent* event);
void QWebInspector_override_virtual_NativeEvent(void* self, intptr_t slot);
bool QWebInspector_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result);
void QWebInspector_override_virtual_ChangeEvent(void* self, intptr_t slot);
void QWebInspector_virtualbase_ChangeEvent(void* self, QEvent* param1);
void QWebInspector_override_virtual_Metric(void* self, intptr_t slot);
int QWebInspector_virtualbase_Metric(const void* self, int param1);
void QWebInspector_override_virtual_InitPainter(void* self, intptr_t slot);
void QWebInspector_virtualbase_InitPainter(const void* self, QPainter* painter);
void QWebInspector_override_virtual_Redirected(void* self, intptr_t slot);
QPaintDevice* QWebInspector_virtualbase_Redirected(const void* self, QPoint* offset);
void QWebInspector_override_virtual_SharedPainter(void* self, intptr_t slot);
QPainter* QWebInspector_virtualbase_SharedPainter(const void* self);
void QWebInspector_override_virtual_InputMethodEvent(void* self, intptr_t slot);
void QWebInspector_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1);
void QWebInspector_override_virtual_InputMethodQuery(void* self, intptr_t slot);
QVariant* QWebInspector_virtualbase_InputMethodQuery(const void* self, int param1);
void QWebInspector_override_virtual_FocusNextPrevChild(void* self, intptr_t slot);
bool QWebInspector_virtualbase_FocusNextPrevChild(void* self, bool next);
void QWebInspector_Delete(QWebInspector* self, bool isSubclass);
#ifdef __cplusplus
} /* extern C */
#endif
#endif

View File

@ -0,0 +1,722 @@
#include <QColor>
#include <QFont>
#include <QList>
#include <QMetaObject>
#include <QObject>
#include <QRect>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QUrl>
#include <QWebHapticFeedbackPlayer>
#include <QWebKitPlatformPlugin>
#include <QWebNotificationData>
#include <QWebNotificationPresenter>
#include <QWebSelectData>
#include <QWebSelectMethod>
#include <QWebSpellChecker>
#define WORKAROUND_INNER_CLASS_DEFINITION_QWebSpellChecker__GrammarDetail
#include <QWebTouchModifier>
#include <qwebkitplatformplugin.h>
#include "gen_qwebkitplatformplugin.h"
#include "_cgo_export.h"
int QWebSelectData_ItemType(const QWebSelectData* self, int param1) {
QWebSelectData::ItemType _ret = self->itemType(static_cast<int>(param1));
return static_cast<int>(_ret);
}
struct miqt_string QWebSelectData_ItemText(const QWebSelectData* self, int index) {
QString _ret = self->itemText(static_cast<int>(index));
// Convert QString from UTF-16 in C++ RAII memory 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 QWebSelectData_ItemToolTip(const QWebSelectData* self, int index) {
QString _ret = self->itemToolTip(static_cast<int>(index));
// Convert QString from UTF-16 in C++ RAII memory 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 QWebSelectData_ItemIsEnabled(const QWebSelectData* self, int index) {
return self->itemIsEnabled(static_cast<int>(index));
}
bool QWebSelectData_ItemIsSelected(const QWebSelectData* self, int index) {
return self->itemIsSelected(static_cast<int>(index));
}
int QWebSelectData_ItemCount(const QWebSelectData* self) {
return self->itemCount();
}
bool QWebSelectData_Multiple(const QWebSelectData* self) {
return self->multiple();
}
QColor* QWebSelectData_BackgroundColor(const QWebSelectData* self) {
return new QColor(self->backgroundColor());
}
QColor* QWebSelectData_ForegroundColor(const QWebSelectData* self) {
return new QColor(self->foregroundColor());
}
QColor* QWebSelectData_ItemBackgroundColor(const QWebSelectData* self, int index) {
return new QColor(self->itemBackgroundColor(static_cast<int>(index)));
}
QColor* QWebSelectData_ItemForegroundColor(const QWebSelectData* self, int index) {
return new QColor(self->itemForegroundColor(static_cast<int>(index)));
}
void QWebSelectData_OperatorAssign(QWebSelectData* self, QWebSelectData* param1) {
self->operator=(*param1);
}
void QWebSelectData_Delete(QWebSelectData* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QWebSelectData*>( self );
} else {
delete self;
}
}
QMetaObject* QWebSelectMethod_MetaObject(const QWebSelectMethod* self) {
return (QMetaObject*) self->metaObject();
}
void* QWebSelectMethod_Metacast(QWebSelectMethod* self, const char* param1) {
return self->qt_metacast(param1);
}
struct miqt_string QWebSelectMethod_Tr(const char* s) {
QString _ret = QWebSelectMethod::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 QWebSelectMethod_TrUtf8(const char* s) {
QString _ret = QWebSelectMethod::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 QWebSelectMethod_Show(QWebSelectMethod* self, QWebSelectData* param1) {
self->show(*param1);
}
void QWebSelectMethod_Hide(QWebSelectMethod* self) {
self->hide();
}
void QWebSelectMethod_SetGeometry(QWebSelectMethod* self, QRect* geometry) {
self->setGeometry(*geometry);
}
void QWebSelectMethod_SetFont(QWebSelectMethod* self, QFont* font) {
self->setFont(*font);
}
void QWebSelectMethod_SelectItem(QWebSelectMethod* self, int index, bool allowMultiplySelections, bool shift) {
self->selectItem(static_cast<int>(index), allowMultiplySelections, shift);
}
void QWebSelectMethod_connect_SelectItem(QWebSelectMethod* self, intptr_t slot) {
QWebSelectMethod::connect(self, static_cast<void (QWebSelectMethod::*)(int, bool, bool)>(&QWebSelectMethod::selectItem), self, [=](int index, bool allowMultiplySelections, bool shift) {
int sigval1 = index;
bool sigval2 = allowMultiplySelections;
bool sigval3 = shift;
miqt_exec_callback_QWebSelectMethod_SelectItem(slot, sigval1, sigval2, sigval3);
});
}
void QWebSelectMethod_DidHide(QWebSelectMethod* self) {
self->didHide();
}
void QWebSelectMethod_connect_DidHide(QWebSelectMethod* self, intptr_t slot) {
QWebSelectMethod::connect(self, static_cast<void (QWebSelectMethod::*)()>(&QWebSelectMethod::didHide), self, [=]() {
miqt_exec_callback_QWebSelectMethod_DidHide(slot);
});
}
struct miqt_string QWebSelectMethod_Tr2(const char* s, const char* c) {
QString _ret = QWebSelectMethod::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 QWebSelectMethod_Tr3(const char* s, const char* c, int n) {
QString _ret = QWebSelectMethod::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 QWebSelectMethod_TrUtf82(const char* s, const char* c) {
QString _ret = QWebSelectMethod::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 QWebSelectMethod_TrUtf83(const char* s, const char* c, int n) {
QString _ret = QWebSelectMethod::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 QWebSelectMethod_Delete(QWebSelectMethod* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QWebSelectMethod*>( self );
} else {
delete self;
}
}
struct miqt_string QWebNotificationData_Title(const QWebNotificationData* self) {
const 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 QWebNotificationData_Message(const QWebNotificationData* self) {
const 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;
}
QUrl* QWebNotificationData_IconUrl(const QWebNotificationData* self) {
return new QUrl(self->iconUrl());
}
QUrl* QWebNotificationData_OpenerPageUrl(const QWebNotificationData* self) {
return new QUrl(self->openerPageUrl());
}
void QWebNotificationData_OperatorAssign(QWebNotificationData* self, QWebNotificationData* param1) {
self->operator=(*param1);
}
void QWebNotificationData_Delete(QWebNotificationData* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QWebNotificationData*>( self );
} else {
delete self;
}
}
QMetaObject* QWebNotificationPresenter_MetaObject(const QWebNotificationPresenter* self) {
return (QMetaObject*) self->metaObject();
}
void* QWebNotificationPresenter_Metacast(QWebNotificationPresenter* self, const char* param1) {
return self->qt_metacast(param1);
}
struct miqt_string QWebNotificationPresenter_Tr(const char* s) {
QString _ret = QWebNotificationPresenter::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 QWebNotificationPresenter_TrUtf8(const char* s) {
QString _ret = QWebNotificationPresenter::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 QWebNotificationPresenter_ShowNotification(QWebNotificationPresenter* self, QWebNotificationData* param1) {
self->showNotification(param1);
}
void QWebNotificationPresenter_NotificationClosed(QWebNotificationPresenter* self) {
self->notificationClosed();
}
void QWebNotificationPresenter_connect_NotificationClosed(QWebNotificationPresenter* self, intptr_t slot) {
QWebNotificationPresenter::connect(self, static_cast<void (QWebNotificationPresenter::*)()>(&QWebNotificationPresenter::notificationClosed), self, [=]() {
miqt_exec_callback_QWebNotificationPresenter_NotificationClosed(slot);
});
}
void QWebNotificationPresenter_NotificationClicked(QWebNotificationPresenter* self) {
self->notificationClicked();
}
void QWebNotificationPresenter_connect_NotificationClicked(QWebNotificationPresenter* self, intptr_t slot) {
QWebNotificationPresenter::connect(self, static_cast<void (QWebNotificationPresenter::*)()>(&QWebNotificationPresenter::notificationClicked), self, [=]() {
miqt_exec_callback_QWebNotificationPresenter_NotificationClicked(slot);
});
}
struct miqt_string QWebNotificationPresenter_Tr2(const char* s, const char* c) {
QString _ret = QWebNotificationPresenter::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 QWebNotificationPresenter_Tr3(const char* s, const char* c, int n) {
QString _ret = QWebNotificationPresenter::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 QWebNotificationPresenter_TrUtf82(const char* s, const char* c) {
QString _ret = QWebNotificationPresenter::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 QWebNotificationPresenter_TrUtf83(const char* s, const char* c, int n) {
QString _ret = QWebNotificationPresenter::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 QWebNotificationPresenter_Delete(QWebNotificationPresenter* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QWebNotificationPresenter*>( self );
} else {
delete self;
}
}
QMetaObject* QWebHapticFeedbackPlayer_MetaObject(const QWebHapticFeedbackPlayer* self) {
return (QMetaObject*) self->metaObject();
}
void* QWebHapticFeedbackPlayer_Metacast(QWebHapticFeedbackPlayer* self, const char* param1) {
return self->qt_metacast(param1);
}
struct miqt_string QWebHapticFeedbackPlayer_Tr(const char* s) {
QString _ret = QWebHapticFeedbackPlayer::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 QWebHapticFeedbackPlayer_TrUtf8(const char* s) {
QString _ret = QWebHapticFeedbackPlayer::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 QWebHapticFeedbackPlayer_PlayHapticFeedback(QWebHapticFeedbackPlayer* self, int param1, struct miqt_string hapticType, int param3) {
QString hapticType_QString = QString::fromUtf8(hapticType.data, hapticType.len);
self->playHapticFeedback(static_cast<const QWebHapticFeedbackPlayer::HapticEvent>(param1), hapticType_QString, static_cast<const QWebHapticFeedbackPlayer::HapticStrength>(param3));
}
struct miqt_string QWebHapticFeedbackPlayer_Tr2(const char* s, const char* c) {
QString _ret = QWebHapticFeedbackPlayer::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 QWebHapticFeedbackPlayer_Tr3(const char* s, const char* c, int n) {
QString _ret = QWebHapticFeedbackPlayer::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 QWebHapticFeedbackPlayer_TrUtf82(const char* s, const char* c) {
QString _ret = QWebHapticFeedbackPlayer::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 QWebHapticFeedbackPlayer_TrUtf83(const char* s, const char* c, int n) {
QString _ret = QWebHapticFeedbackPlayer::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 QWebHapticFeedbackPlayer_Delete(QWebHapticFeedbackPlayer* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QWebHapticFeedbackPlayer*>( self );
} else {
delete self;
}
}
QMetaObject* QWebTouchModifier_MetaObject(const QWebTouchModifier* self) {
return (QMetaObject*) self->metaObject();
}
void* QWebTouchModifier_Metacast(QWebTouchModifier* self, const char* param1) {
return self->qt_metacast(param1);
}
struct miqt_string QWebTouchModifier_Tr(const char* s) {
QString _ret = QWebTouchModifier::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 QWebTouchModifier_TrUtf8(const char* s) {
QString _ret = QWebTouchModifier::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 QWebTouchModifier_HitTestPaddingForTouch(const QWebTouchModifier* self, int param1) {
return self->hitTestPaddingForTouch(static_cast<const QWebTouchModifier::PaddingDirection>(param1));
}
struct miqt_string QWebTouchModifier_Tr2(const char* s, const char* c) {
QString _ret = QWebTouchModifier::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 QWebTouchModifier_Tr3(const char* s, const char* c, int n) {
QString _ret = QWebTouchModifier::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 QWebTouchModifier_TrUtf82(const char* s, const char* c) {
QString _ret = QWebTouchModifier::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 QWebTouchModifier_TrUtf83(const char* s, const char* c, int n) {
QString _ret = QWebTouchModifier::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 QWebTouchModifier_Delete(QWebTouchModifier* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QWebTouchModifier*>( self );
} else {
delete self;
}
}
QMetaObject* QWebSpellChecker_MetaObject(const QWebSpellChecker* self) {
return (QMetaObject*) self->metaObject();
}
void* QWebSpellChecker_Metacast(QWebSpellChecker* self, const char* param1) {
return self->qt_metacast(param1);
}
struct miqt_string QWebSpellChecker_Tr(const char* s) {
QString _ret = QWebSpellChecker::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 QWebSpellChecker_TrUtf8(const char* s) {
QString _ret = QWebSpellChecker::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 QWebSpellChecker_IsContinousSpellCheckingEnabled(const QWebSpellChecker* self) {
return self->isContinousSpellCheckingEnabled();
}
void QWebSpellChecker_ToggleContinousSpellChecking(QWebSpellChecker* self) {
self->toggleContinousSpellChecking();
}
void QWebSpellChecker_LearnWord(QWebSpellChecker* self, struct miqt_string word) {
QString word_QString = QString::fromUtf8(word.data, word.len);
self->learnWord(word_QString);
}
void QWebSpellChecker_IgnoreWordInSpellDocument(QWebSpellChecker* self, struct miqt_string word) {
QString word_QString = QString::fromUtf8(word.data, word.len);
self->ignoreWordInSpellDocument(word_QString);
}
void QWebSpellChecker_CheckSpellingOfString(QWebSpellChecker* self, struct miqt_string word, int* misspellingLocation, int* misspellingLength) {
QString word_QString = QString::fromUtf8(word.data, word.len);
self->checkSpellingOfString(word_QString, static_cast<int*>(misspellingLocation), static_cast<int*>(misspellingLength));
}
struct miqt_string QWebSpellChecker_AutoCorrectSuggestionForMisspelledWord(QWebSpellChecker* self, struct miqt_string word) {
QString word_QString = QString::fromUtf8(word.data, word.len);
QString _ret = self->autoCorrectSuggestionForMisspelledWord(word_QString);
// Convert QString from UTF-16 in C++ RAII memory 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 QWebSpellChecker_GuessesForWord(QWebSpellChecker* self, struct miqt_string word, struct miqt_string context, struct miqt_array /* of struct miqt_string */ guesses) {
QString word_QString = QString::fromUtf8(word.data, word.len);
QString context_QString = QString::fromUtf8(context.data, context.len);
QStringList guesses_QList;
guesses_QList.reserve(guesses.len);
struct miqt_string* guesses_arr = static_cast<struct miqt_string*>(guesses.data);
for(size_t i = 0; i < guesses.len; ++i) {
QString guesses_arr_i_QString = QString::fromUtf8(guesses_arr[i].data, guesses_arr[i].len);
guesses_QList.push_back(guesses_arr_i_QString);
}
self->guessesForWord(word_QString, context_QString, guesses_QList);
}
bool QWebSpellChecker_IsGrammarCheckingEnabled(QWebSpellChecker* self) {
return self->isGrammarCheckingEnabled();
}
void QWebSpellChecker_ToggleGrammarChecking(QWebSpellChecker* self) {
self->toggleGrammarChecking();
}
void QWebSpellChecker_CheckGrammarOfString(QWebSpellChecker* self, struct miqt_string param1, struct miqt_array /* of QWebSpellChecker__GrammarDetail* */ param2, int* badGrammarLocation, int* badGrammarLength) {
QString param1_QString = QString::fromUtf8(param1.data, param1.len);
QList<QWebSpellChecker::GrammarDetail> param2_QList;
param2_QList.reserve(param2.len);
QWebSpellChecker__GrammarDetail** param2_arr = static_cast<QWebSpellChecker__GrammarDetail**>(param2.data);
for(size_t i = 0; i < param2.len; ++i) {
param2_QList.push_back(*(param2_arr[i]));
}
self->checkGrammarOfString(param1_QString, param2_QList, static_cast<int*>(badGrammarLocation), static_cast<int*>(badGrammarLength));
}
struct miqt_string QWebSpellChecker_Tr2(const char* s, const char* c) {
QString _ret = QWebSpellChecker::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 QWebSpellChecker_Tr3(const char* s, const char* c, int n) {
QString _ret = QWebSpellChecker::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 QWebSpellChecker_TrUtf82(const char* s, const char* c) {
QString _ret = QWebSpellChecker::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 QWebSpellChecker_TrUtf83(const char* s, const char* c, int n) {
QString _ret = QWebSpellChecker::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 QWebSpellChecker_Delete(QWebSpellChecker* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QWebSpellChecker*>( self );
} else {
delete self;
}
}
bool QWebKitPlatformPlugin_SupportsExtension(const QWebKitPlatformPlugin* self, int param1) {
return self->supportsExtension(static_cast<QWebKitPlatformPlugin::Extension>(param1));
}
QObject* QWebKitPlatformPlugin_CreateExtension(const QWebKitPlatformPlugin* self, int param1) {
return self->createExtension(static_cast<QWebKitPlatformPlugin::Extension>(param1));
}
void QWebKitPlatformPlugin_OperatorAssign(QWebKitPlatformPlugin* self, QWebKitPlatformPlugin* param1) {
self->operator=(*param1);
}
void QWebKitPlatformPlugin_Delete(QWebKitPlatformPlugin* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QWebKitPlatformPlugin*>( self );
} else {
delete self;
}
}
void QWebSpellChecker__GrammarDetail_new(QWebSpellChecker__GrammarDetail* param1, QWebSpellChecker__GrammarDetail** outptr_QWebSpellChecker__GrammarDetail) {
QWebSpellChecker::GrammarDetail* ret = new QWebSpellChecker::GrammarDetail(*param1);
*outptr_QWebSpellChecker__GrammarDetail = ret;
}
void QWebSpellChecker__GrammarDetail_OperatorAssign(QWebSpellChecker__GrammarDetail* self, QWebSpellChecker__GrammarDetail* param1) {
self->operator=(*param1);
}
void QWebSpellChecker__GrammarDetail_Delete(QWebSpellChecker__GrammarDetail* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QWebSpellChecker::GrammarDetail*>( self );
} else {
delete self;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,164 @@
#pragma once
#ifndef MIQT_QT_WEBKIT_GEN_QWEBKITPLATFORMPLUGIN_H
#define MIQT_QT_WEBKIT_GEN_QWEBKITPLATFORMPLUGIN_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 QColor;
class QFont;
class QMetaObject;
class QObject;
class QRect;
class QUrl;
class QWebHapticFeedbackPlayer;
class QWebKitPlatformPlugin;
class QWebNotificationData;
class QWebNotificationPresenter;
class QWebSelectData;
class QWebSelectMethod;
class QWebSpellChecker;
#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QWebSpellChecker__GrammarDetail)
typedef QWebSpellChecker::GrammarDetail QWebSpellChecker__GrammarDetail;
#else
class QWebSpellChecker__GrammarDetail;
#endif
class QWebTouchModifier;
#else
typedef struct QColor QColor;
typedef struct QFont QFont;
typedef struct QMetaObject QMetaObject;
typedef struct QObject QObject;
typedef struct QRect QRect;
typedef struct QUrl QUrl;
typedef struct QWebHapticFeedbackPlayer QWebHapticFeedbackPlayer;
typedef struct QWebKitPlatformPlugin QWebKitPlatformPlugin;
typedef struct QWebNotificationData QWebNotificationData;
typedef struct QWebNotificationPresenter QWebNotificationPresenter;
typedef struct QWebSelectData QWebSelectData;
typedef struct QWebSelectMethod QWebSelectMethod;
typedef struct QWebSpellChecker QWebSpellChecker;
typedef struct QWebSpellChecker__GrammarDetail QWebSpellChecker__GrammarDetail;
typedef struct QWebTouchModifier QWebTouchModifier;
#endif
int QWebSelectData_ItemType(const QWebSelectData* self, int param1);
struct miqt_string QWebSelectData_ItemText(const QWebSelectData* self, int index);
struct miqt_string QWebSelectData_ItemToolTip(const QWebSelectData* self, int index);
bool QWebSelectData_ItemIsEnabled(const QWebSelectData* self, int index);
bool QWebSelectData_ItemIsSelected(const QWebSelectData* self, int index);
int QWebSelectData_ItemCount(const QWebSelectData* self);
bool QWebSelectData_Multiple(const QWebSelectData* self);
QColor* QWebSelectData_BackgroundColor(const QWebSelectData* self);
QColor* QWebSelectData_ForegroundColor(const QWebSelectData* self);
QColor* QWebSelectData_ItemBackgroundColor(const QWebSelectData* self, int index);
QColor* QWebSelectData_ItemForegroundColor(const QWebSelectData* self, int index);
void QWebSelectData_OperatorAssign(QWebSelectData* self, QWebSelectData* param1);
void QWebSelectData_Delete(QWebSelectData* self, bool isSubclass);
QMetaObject* QWebSelectMethod_MetaObject(const QWebSelectMethod* self);
void* QWebSelectMethod_Metacast(QWebSelectMethod* self, const char* param1);
struct miqt_string QWebSelectMethod_Tr(const char* s);
struct miqt_string QWebSelectMethod_TrUtf8(const char* s);
void QWebSelectMethod_Show(QWebSelectMethod* self, QWebSelectData* param1);
void QWebSelectMethod_Hide(QWebSelectMethod* self);
void QWebSelectMethod_SetGeometry(QWebSelectMethod* self, QRect* geometry);
void QWebSelectMethod_SetFont(QWebSelectMethod* self, QFont* font);
void QWebSelectMethod_SelectItem(QWebSelectMethod* self, int index, bool allowMultiplySelections, bool shift);
void QWebSelectMethod_connect_SelectItem(QWebSelectMethod* self, intptr_t slot);
void QWebSelectMethod_DidHide(QWebSelectMethod* self);
void QWebSelectMethod_connect_DidHide(QWebSelectMethod* self, intptr_t slot);
struct miqt_string QWebSelectMethod_Tr2(const char* s, const char* c);
struct miqt_string QWebSelectMethod_Tr3(const char* s, const char* c, int n);
struct miqt_string QWebSelectMethod_TrUtf82(const char* s, const char* c);
struct miqt_string QWebSelectMethod_TrUtf83(const char* s, const char* c, int n);
void QWebSelectMethod_Delete(QWebSelectMethod* self, bool isSubclass);
struct miqt_string QWebNotificationData_Title(const QWebNotificationData* self);
struct miqt_string QWebNotificationData_Message(const QWebNotificationData* self);
QUrl* QWebNotificationData_IconUrl(const QWebNotificationData* self);
QUrl* QWebNotificationData_OpenerPageUrl(const QWebNotificationData* self);
void QWebNotificationData_OperatorAssign(QWebNotificationData* self, QWebNotificationData* param1);
void QWebNotificationData_Delete(QWebNotificationData* self, bool isSubclass);
QMetaObject* QWebNotificationPresenter_MetaObject(const QWebNotificationPresenter* self);
void* QWebNotificationPresenter_Metacast(QWebNotificationPresenter* self, const char* param1);
struct miqt_string QWebNotificationPresenter_Tr(const char* s);
struct miqt_string QWebNotificationPresenter_TrUtf8(const char* s);
void QWebNotificationPresenter_ShowNotification(QWebNotificationPresenter* self, QWebNotificationData* param1);
void QWebNotificationPresenter_NotificationClosed(QWebNotificationPresenter* self);
void QWebNotificationPresenter_connect_NotificationClosed(QWebNotificationPresenter* self, intptr_t slot);
void QWebNotificationPresenter_NotificationClicked(QWebNotificationPresenter* self);
void QWebNotificationPresenter_connect_NotificationClicked(QWebNotificationPresenter* self, intptr_t slot);
struct miqt_string QWebNotificationPresenter_Tr2(const char* s, const char* c);
struct miqt_string QWebNotificationPresenter_Tr3(const char* s, const char* c, int n);
struct miqt_string QWebNotificationPresenter_TrUtf82(const char* s, const char* c);
struct miqt_string QWebNotificationPresenter_TrUtf83(const char* s, const char* c, int n);
void QWebNotificationPresenter_Delete(QWebNotificationPresenter* self, bool isSubclass);
QMetaObject* QWebHapticFeedbackPlayer_MetaObject(const QWebHapticFeedbackPlayer* self);
void* QWebHapticFeedbackPlayer_Metacast(QWebHapticFeedbackPlayer* self, const char* param1);
struct miqt_string QWebHapticFeedbackPlayer_Tr(const char* s);
struct miqt_string QWebHapticFeedbackPlayer_TrUtf8(const char* s);
void QWebHapticFeedbackPlayer_PlayHapticFeedback(QWebHapticFeedbackPlayer* self, int param1, struct miqt_string hapticType, int param3);
struct miqt_string QWebHapticFeedbackPlayer_Tr2(const char* s, const char* c);
struct miqt_string QWebHapticFeedbackPlayer_Tr3(const char* s, const char* c, int n);
struct miqt_string QWebHapticFeedbackPlayer_TrUtf82(const char* s, const char* c);
struct miqt_string QWebHapticFeedbackPlayer_TrUtf83(const char* s, const char* c, int n);
void QWebHapticFeedbackPlayer_Delete(QWebHapticFeedbackPlayer* self, bool isSubclass);
QMetaObject* QWebTouchModifier_MetaObject(const QWebTouchModifier* self);
void* QWebTouchModifier_Metacast(QWebTouchModifier* self, const char* param1);
struct miqt_string QWebTouchModifier_Tr(const char* s);
struct miqt_string QWebTouchModifier_TrUtf8(const char* s);
unsigned int QWebTouchModifier_HitTestPaddingForTouch(const QWebTouchModifier* self, int param1);
struct miqt_string QWebTouchModifier_Tr2(const char* s, const char* c);
struct miqt_string QWebTouchModifier_Tr3(const char* s, const char* c, int n);
struct miqt_string QWebTouchModifier_TrUtf82(const char* s, const char* c);
struct miqt_string QWebTouchModifier_TrUtf83(const char* s, const char* c, int n);
void QWebTouchModifier_Delete(QWebTouchModifier* self, bool isSubclass);
QMetaObject* QWebSpellChecker_MetaObject(const QWebSpellChecker* self);
void* QWebSpellChecker_Metacast(QWebSpellChecker* self, const char* param1);
struct miqt_string QWebSpellChecker_Tr(const char* s);
struct miqt_string QWebSpellChecker_TrUtf8(const char* s);
bool QWebSpellChecker_IsContinousSpellCheckingEnabled(const QWebSpellChecker* self);
void QWebSpellChecker_ToggleContinousSpellChecking(QWebSpellChecker* self);
void QWebSpellChecker_LearnWord(QWebSpellChecker* self, struct miqt_string word);
void QWebSpellChecker_IgnoreWordInSpellDocument(QWebSpellChecker* self, struct miqt_string word);
void QWebSpellChecker_CheckSpellingOfString(QWebSpellChecker* self, struct miqt_string word, int* misspellingLocation, int* misspellingLength);
struct miqt_string QWebSpellChecker_AutoCorrectSuggestionForMisspelledWord(QWebSpellChecker* self, struct miqt_string word);
void QWebSpellChecker_GuessesForWord(QWebSpellChecker* self, struct miqt_string word, struct miqt_string context, struct miqt_array /* of struct miqt_string */ guesses);
bool QWebSpellChecker_IsGrammarCheckingEnabled(QWebSpellChecker* self);
void QWebSpellChecker_ToggleGrammarChecking(QWebSpellChecker* self);
void QWebSpellChecker_CheckGrammarOfString(QWebSpellChecker* self, struct miqt_string param1, struct miqt_array /* of QWebSpellChecker__GrammarDetail* */ param2, int* badGrammarLocation, int* badGrammarLength);
struct miqt_string QWebSpellChecker_Tr2(const char* s, const char* c);
struct miqt_string QWebSpellChecker_Tr3(const char* s, const char* c, int n);
struct miqt_string QWebSpellChecker_TrUtf82(const char* s, const char* c);
struct miqt_string QWebSpellChecker_TrUtf83(const char* s, const char* c, int n);
void QWebSpellChecker_Delete(QWebSpellChecker* self, bool isSubclass);
bool QWebKitPlatformPlugin_SupportsExtension(const QWebKitPlatformPlugin* self, int param1);
QObject* QWebKitPlatformPlugin_CreateExtension(const QWebKitPlatformPlugin* self, int param1);
void QWebKitPlatformPlugin_OperatorAssign(QWebKitPlatformPlugin* self, QWebKitPlatformPlugin* param1);
void QWebKitPlatformPlugin_Delete(QWebKitPlatformPlugin* self, bool isSubclass);
void QWebSpellChecker__GrammarDetail_new(QWebSpellChecker__GrammarDetail* param1, QWebSpellChecker__GrammarDetail** outptr_QWebSpellChecker__GrammarDetail);
void QWebSpellChecker__GrammarDetail_OperatorAssign(QWebSpellChecker__GrammarDetail* self, QWebSpellChecker__GrammarDetail* param1);
void QWebSpellChecker__GrammarDetail_Delete(QWebSpellChecker__GrammarDetail* self, bool isSubclass);
#ifdef __cplusplus
} /* extern C */
#endif
#endif

1708
qt/webkit/gen_qwebpage.cpp Normal file

File diff suppressed because it is too large Load Diff

2343
qt/webkit/gen_qwebpage.go Normal file

File diff suppressed because it is too large Load Diff

334
qt/webkit/gen_qwebpage.h Normal file
View File

@ -0,0 +1,334 @@
#pragma once
#ifndef MIQT_QT_WEBKIT_GEN_QWEBPAGE_H
#define MIQT_QT_WEBKIT_GEN_QWEBPAGE_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 QChildEvent;
class QContextMenuEvent;
class QEvent;
class QMenu;
class QMetaMethod;
class QMetaObject;
class QNetworkAccessManager;
class QNetworkReply;
class QNetworkRequest;
class QObject;
class QPalette;
class QPoint;
class QRect;
class QSize;
class QSizeF;
class QTimerEvent;
class QUndoStack;
class QUrl;
class QVariant;
class QWebElement;
class QWebFrame;
class QWebFullScreenRequest;
class QWebHistory;
class QWebHistoryItem;
class QWebPage;
#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QWebPage__ChooseMultipleFilesExtensionOption)
typedef QWebPage::ChooseMultipleFilesExtensionOption QWebPage__ChooseMultipleFilesExtensionOption;
#else
class QWebPage__ChooseMultipleFilesExtensionOption;
#endif
#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QWebPage__ChooseMultipleFilesExtensionReturn)
typedef QWebPage::ChooseMultipleFilesExtensionReturn QWebPage__ChooseMultipleFilesExtensionReturn;
#else
class QWebPage__ChooseMultipleFilesExtensionReturn;
#endif
#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QWebPage__ErrorPageExtensionOption)
typedef QWebPage::ErrorPageExtensionOption QWebPage__ErrorPageExtensionOption;
#else
class QWebPage__ErrorPageExtensionOption;
#endif
#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QWebPage__ErrorPageExtensionReturn)
typedef QWebPage::ErrorPageExtensionReturn QWebPage__ErrorPageExtensionReturn;
#else
class QWebPage__ErrorPageExtensionReturn;
#endif
#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QWebPage__ExtensionOption)
typedef QWebPage::ExtensionOption QWebPage__ExtensionOption;
#else
class QWebPage__ExtensionOption;
#endif
#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QWebPage__ExtensionReturn)
typedef QWebPage::ExtensionReturn QWebPage__ExtensionReturn;
#else
class QWebPage__ExtensionReturn;
#endif
#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QWebPage__ViewportAttributes)
typedef QWebPage::ViewportAttributes QWebPage__ViewportAttributes;
#else
class QWebPage__ViewportAttributes;
#endif
class QWebPluginFactory;
class QWebSecurityOrigin;
class QWebSettings;
class QWidget;
#else
typedef struct QAction QAction;
typedef struct QChildEvent QChildEvent;
typedef struct QContextMenuEvent QContextMenuEvent;
typedef struct QEvent QEvent;
typedef struct QMenu QMenu;
typedef struct QMetaMethod QMetaMethod;
typedef struct QMetaObject QMetaObject;
typedef struct QNetworkAccessManager QNetworkAccessManager;
typedef struct QNetworkReply QNetworkReply;
typedef struct QNetworkRequest QNetworkRequest;
typedef struct QObject QObject;
typedef struct QPalette QPalette;
typedef struct QPoint QPoint;
typedef struct QRect QRect;
typedef struct QSize QSize;
typedef struct QSizeF QSizeF;
typedef struct QTimerEvent QTimerEvent;
typedef struct QUndoStack QUndoStack;
typedef struct QUrl QUrl;
typedef struct QVariant QVariant;
typedef struct QWebElement QWebElement;
typedef struct QWebFrame QWebFrame;
typedef struct QWebFullScreenRequest QWebFullScreenRequest;
typedef struct QWebHistory QWebHistory;
typedef struct QWebHistoryItem QWebHistoryItem;
typedef struct QWebPage QWebPage;
typedef struct QWebPage__ChooseMultipleFilesExtensionOption QWebPage__ChooseMultipleFilesExtensionOption;
typedef struct QWebPage__ChooseMultipleFilesExtensionReturn QWebPage__ChooseMultipleFilesExtensionReturn;
typedef struct QWebPage__ErrorPageExtensionOption QWebPage__ErrorPageExtensionOption;
typedef struct QWebPage__ErrorPageExtensionReturn QWebPage__ErrorPageExtensionReturn;
typedef struct QWebPage__ExtensionOption QWebPage__ExtensionOption;
typedef struct QWebPage__ExtensionReturn QWebPage__ExtensionReturn;
typedef struct QWebPage__ViewportAttributes QWebPage__ViewportAttributes;
typedef struct QWebPluginFactory QWebPluginFactory;
typedef struct QWebSecurityOrigin QWebSecurityOrigin;
typedef struct QWebSettings QWebSettings;
typedef struct QWidget QWidget;
#endif
void QWebPage_new(QWebPage** outptr_QWebPage, QObject** outptr_QObject);
void QWebPage_new2(QObject* parent, QWebPage** outptr_QWebPage, QObject** outptr_QObject);
QMetaObject* QWebPage_MetaObject(const QWebPage* self);
void* QWebPage_Metacast(QWebPage* self, const char* param1);
struct miqt_string QWebPage_Tr(const char* s);
struct miqt_string QWebPage_TrUtf8(const char* s);
QWebFrame* QWebPage_MainFrame(const QWebPage* self);
QWebFrame* QWebPage_CurrentFrame(const QWebPage* self);
QWebFrame* QWebPage_FrameAt(const QWebPage* self, QPoint* pos);
QWebHistory* QWebPage_History(const QWebPage* self);
QWebSettings* QWebPage_Settings(const QWebPage* self);
void QWebPage_SetView(QWebPage* self, QWidget* view);
QWidget* QWebPage_View(const QWebPage* self);
bool QWebPage_IsModified(const QWebPage* self);
QUndoStack* QWebPage_UndoStack(const QWebPage* self);
void QWebPage_SetNetworkAccessManager(QWebPage* self, QNetworkAccessManager* manager);
QNetworkAccessManager* QWebPage_NetworkAccessManager(const QWebPage* self);
void QWebPage_SetPluginFactory(QWebPage* self, QWebPluginFactory* factory);
QWebPluginFactory* QWebPage_PluginFactory(const QWebPage* self);
unsigned long long QWebPage_TotalBytes(const QWebPage* self);
unsigned long long QWebPage_BytesReceived(const QWebPage* self);
int QWebPage_VisibilityState(const QWebPage* self);
void QWebPage_SetVisibilityState(QWebPage* self, int visibilityState);
bool QWebPage_RecentlyAudible(const QWebPage* self);
bool QWebPage_HasSelection(const QWebPage* self);
struct miqt_string QWebPage_SelectedText(const QWebPage* self);
struct miqt_string QWebPage_SelectedHtml(const QWebPage* self);
QAction* QWebPage_Action(const QWebPage* self, int action);
QAction* QWebPage_CustomAction(const QWebPage* self, int action);
void QWebPage_TriggerAction(QWebPage* self, int action, bool checked);
void QWebPage_SetDevicePixelRatio(QWebPage* self, double ratio);
double QWebPage_DevicePixelRatio(const QWebPage* self);
void QWebPage_ResetDevicePixelRatio(QWebPage* self);
QSize* QWebPage_ViewportSize(const QWebPage* self);
void QWebPage_SetViewportSize(const QWebPage* self, QSize* size);
QWebPage__ViewportAttributes* QWebPage_ViewportAttributesForSize(const QWebPage* self, QSize* availableSize);
QSize* QWebPage_PreferredContentsSize(const QWebPage* self);
void QWebPage_SetPreferredContentsSize(const QWebPage* self, QSize* size);
void QWebPage_SetActualVisibleContentRect(const QWebPage* self, QRect* rect);
bool QWebPage_Event(QWebPage* self, QEvent* param1);
bool QWebPage_FocusNextPrevChild(QWebPage* self, bool next);
QVariant* QWebPage_InputMethodQuery(const QWebPage* self, int property);
bool QWebPage_FindText(QWebPage* self, struct miqt_string subString);
void QWebPage_SetForwardUnsupportedContent(QWebPage* self, bool forward);
bool QWebPage_ForwardUnsupportedContent(const QWebPage* self);
void QWebPage_SetLinkDelegationPolicy(QWebPage* self, int policy);
int QWebPage_LinkDelegationPolicy(const QWebPage* self);
void QWebPage_SetPalette(QWebPage* self, QPalette* palette);
QPalette* QWebPage_Palette(const QWebPage* self);
void QWebPage_SetContentEditable(QWebPage* self, bool editable);
bool QWebPage_IsContentEditable(const QWebPage* self);
bool QWebPage_SwallowContextMenuEvent(QWebPage* self, QContextMenuEvent* event);
void QWebPage_UpdatePositionDependentActions(QWebPage* self, QPoint* pos);
QMenu* QWebPage_CreateStandardContextMenu(QWebPage* self);
void QWebPage_SetFeaturePermission(QWebPage* self, QWebFrame* frame, int feature, int policy);
struct miqt_array /* of struct miqt_string */ QWebPage_SupportedContentTypes(const QWebPage* self);
bool QWebPage_SupportsContentType(const QWebPage* self, struct miqt_string mimeType);
bool QWebPage_Extension(QWebPage* self, int extension, QWebPage__ExtensionOption* option, QWebPage__ExtensionReturn* output);
bool QWebPage_SupportsExtension(const QWebPage* self, int extension);
bool QWebPage_ShouldInterruptJavaScript(QWebPage* self);
void QWebPage_LoadStarted(QWebPage* self);
void QWebPage_connect_LoadStarted(QWebPage* self, intptr_t slot);
void QWebPage_LoadProgress(QWebPage* self, int progress);
void QWebPage_connect_LoadProgress(QWebPage* self, intptr_t slot);
void QWebPage_LoadFinished(QWebPage* self, bool ok);
void QWebPage_connect_LoadFinished(QWebPage* self, intptr_t slot);
void QWebPage_LinkHovered(QWebPage* self, struct miqt_string link, struct miqt_string title, struct miqt_string textContent);
void QWebPage_connect_LinkHovered(QWebPage* self, intptr_t slot);
void QWebPage_StatusBarMessage(QWebPage* self, struct miqt_string text);
void QWebPage_connect_StatusBarMessage(QWebPage* self, intptr_t slot);
void QWebPage_SelectionChanged(QWebPage* self);
void QWebPage_connect_SelectionChanged(QWebPage* self, intptr_t slot);
void QWebPage_FrameCreated(QWebPage* self, QWebFrame* frame);
void QWebPage_connect_FrameCreated(QWebPage* self, intptr_t slot);
void QWebPage_GeometryChangeRequested(QWebPage* self, QRect* geom);
void QWebPage_connect_GeometryChangeRequested(QWebPage* self, intptr_t slot);
void QWebPage_RepaintRequested(QWebPage* self, QRect* dirtyRect);
void QWebPage_connect_RepaintRequested(QWebPage* self, intptr_t slot);
void QWebPage_ScrollRequested(QWebPage* self, int dx, int dy, QRect* scrollViewRect);
void QWebPage_connect_ScrollRequested(QWebPage* self, intptr_t slot);
void QWebPage_WindowCloseRequested(QWebPage* self);
void QWebPage_connect_WindowCloseRequested(QWebPage* self, intptr_t slot);
void QWebPage_PrintRequested(QWebPage* self, QWebFrame* frame);
void QWebPage_connect_PrintRequested(QWebPage* self, intptr_t slot);
void QWebPage_LinkClicked(QWebPage* self, QUrl* url);
void QWebPage_connect_LinkClicked(QWebPage* self, intptr_t slot);
void QWebPage_ToolBarVisibilityChangeRequested(QWebPage* self, bool visible);
void QWebPage_connect_ToolBarVisibilityChangeRequested(QWebPage* self, intptr_t slot);
void QWebPage_StatusBarVisibilityChangeRequested(QWebPage* self, bool visible);
void QWebPage_connect_StatusBarVisibilityChangeRequested(QWebPage* self, intptr_t slot);
void QWebPage_MenuBarVisibilityChangeRequested(QWebPage* self, bool visible);
void QWebPage_connect_MenuBarVisibilityChangeRequested(QWebPage* self, intptr_t slot);
void QWebPage_UnsupportedContent(QWebPage* self, QNetworkReply* reply);
void QWebPage_connect_UnsupportedContent(QWebPage* self, intptr_t slot);
void QWebPage_DownloadRequested(QWebPage* self, QNetworkRequest* request);
void QWebPage_connect_DownloadRequested(QWebPage* self, intptr_t slot);
void QWebPage_FocusedElementChanged(QWebPage* self, QWebElement* element);
void QWebPage_connect_FocusedElementChanged(QWebPage* self, intptr_t slot);
void QWebPage_MicroFocusChanged(QWebPage* self);
void QWebPage_connect_MicroFocusChanged(QWebPage* self, intptr_t slot);
void QWebPage_ContentsChanged(QWebPage* self);
void QWebPage_connect_ContentsChanged(QWebPage* self, intptr_t slot);
void QWebPage_DatabaseQuotaExceeded(QWebPage* self, QWebFrame* frame, struct miqt_string databaseName);
void QWebPage_connect_DatabaseQuotaExceeded(QWebPage* self, intptr_t slot);
void QWebPage_ApplicationCacheQuotaExceeded(QWebPage* self, QWebSecurityOrigin* origin, unsigned long long defaultOriginQuota, unsigned long long totalSpaceNeeded);
void QWebPage_connect_ApplicationCacheQuotaExceeded(QWebPage* self, intptr_t slot);
void QWebPage_SaveFrameStateRequested(QWebPage* self, QWebFrame* frame, QWebHistoryItem* item);
void QWebPage_connect_SaveFrameStateRequested(QWebPage* self, intptr_t slot);
void QWebPage_RestoreFrameStateRequested(QWebPage* self, QWebFrame* frame);
void QWebPage_connect_RestoreFrameStateRequested(QWebPage* self, intptr_t slot);
void QWebPage_ViewportChangeRequested(QWebPage* self);
void QWebPage_connect_ViewportChangeRequested(QWebPage* self, intptr_t slot);
void QWebPage_FeaturePermissionRequested(QWebPage* self, QWebFrame* frame, int feature);
void QWebPage_connect_FeaturePermissionRequested(QWebPage* self, intptr_t slot);
void QWebPage_FeaturePermissionRequestCanceled(QWebPage* self, QWebFrame* frame, int feature);
void QWebPage_connect_FeaturePermissionRequestCanceled(QWebPage* self, intptr_t slot);
void QWebPage_FullScreenRequested(QWebPage* self, QWebFullScreenRequest* fullScreenRequest);
void QWebPage_connect_FullScreenRequested(QWebPage* self, intptr_t slot);
void QWebPage_ConsoleMessageReceived(QWebPage* self, int source, int level, struct miqt_string message, int lineNumber, struct miqt_string sourceID);
void QWebPage_connect_ConsoleMessageReceived(QWebPage* self, intptr_t slot);
void QWebPage_RecentlyAudibleChanged(QWebPage* self, bool recentlyAudible);
void QWebPage_connect_RecentlyAudibleChanged(QWebPage* self, intptr_t slot);
QWebPage* QWebPage_CreateWindow(QWebPage* self, int typeVal);
QObject* QWebPage_CreatePlugin(QWebPage* self, struct miqt_string classid, QUrl* url, struct miqt_array /* of struct miqt_string */ paramNames, struct miqt_array /* of struct miqt_string */ paramValues);
bool QWebPage_AcceptNavigationRequest(QWebPage* self, QWebFrame* frame, QNetworkRequest* request, int typeVal);
struct miqt_string QWebPage_ChooseFile(QWebPage* self, QWebFrame* originatingFrame, struct miqt_string oldFile);
void QWebPage_JavaScriptAlert(QWebPage* self, QWebFrame* originatingFrame, struct miqt_string msg);
bool QWebPage_JavaScriptConfirm(QWebPage* self, QWebFrame* originatingFrame, struct miqt_string msg);
void QWebPage_JavaScriptConsoleMessage(QWebPage* self, struct miqt_string message, int lineNumber, struct miqt_string sourceID);
struct miqt_string QWebPage_UserAgentForUrl(const QWebPage* self, QUrl* url);
struct miqt_string QWebPage_Tr2(const char* s, const char* c);
struct miqt_string QWebPage_Tr3(const char* s, const char* c, int n);
struct miqt_string QWebPage_TrUtf82(const char* s, const char* c);
struct miqt_string QWebPage_TrUtf83(const char* s, const char* c, int n);
bool QWebPage_FindText2(QWebPage* self, struct miqt_string subString, int options);
void QWebPage_override_virtual_TriggerAction(void* self, intptr_t slot);
void QWebPage_virtualbase_TriggerAction(void* self, int action, bool checked);
void QWebPage_override_virtual_Event(void* self, intptr_t slot);
bool QWebPage_virtualbase_Event(void* self, QEvent* param1);
void QWebPage_override_virtual_Extension(void* self, intptr_t slot);
bool QWebPage_virtualbase_Extension(void* self, int extension, QWebPage__ExtensionOption* option, QWebPage__ExtensionReturn* output);
void QWebPage_override_virtual_SupportsExtension(void* self, intptr_t slot);
bool QWebPage_virtualbase_SupportsExtension(const void* self, int extension);
void QWebPage_override_virtual_ShouldInterruptJavaScript(void* self, intptr_t slot);
bool QWebPage_virtualbase_ShouldInterruptJavaScript(void* self);
void QWebPage_override_virtual_CreateWindow(void* self, intptr_t slot);
QWebPage* QWebPage_virtualbase_CreateWindow(void* self, int typeVal);
void QWebPage_override_virtual_CreatePlugin(void* self, intptr_t slot);
QObject* QWebPage_virtualbase_CreatePlugin(void* self, struct miqt_string classid, QUrl* url, struct miqt_array /* of struct miqt_string */ paramNames, struct miqt_array /* of struct miqt_string */ paramValues);
void QWebPage_override_virtual_AcceptNavigationRequest(void* self, intptr_t slot);
bool QWebPage_virtualbase_AcceptNavigationRequest(void* self, QWebFrame* frame, QNetworkRequest* request, int typeVal);
void QWebPage_override_virtual_ChooseFile(void* self, intptr_t slot);
struct miqt_string QWebPage_virtualbase_ChooseFile(void* self, QWebFrame* originatingFrame, struct miqt_string oldFile);
void QWebPage_override_virtual_JavaScriptAlert(void* self, intptr_t slot);
void QWebPage_virtualbase_JavaScriptAlert(void* self, QWebFrame* originatingFrame, struct miqt_string msg);
void QWebPage_override_virtual_JavaScriptConfirm(void* self, intptr_t slot);
bool QWebPage_virtualbase_JavaScriptConfirm(void* self, QWebFrame* originatingFrame, struct miqt_string msg);
void QWebPage_override_virtual_JavaScriptConsoleMessage(void* self, intptr_t slot);
void QWebPage_virtualbase_JavaScriptConsoleMessage(void* self, struct miqt_string message, int lineNumber, struct miqt_string sourceID);
void QWebPage_override_virtual_UserAgentForUrl(void* self, intptr_t slot);
struct miqt_string QWebPage_virtualbase_UserAgentForUrl(const void* self, QUrl* url);
void QWebPage_override_virtual_EventFilter(void* self, intptr_t slot);
bool QWebPage_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event);
void QWebPage_override_virtual_TimerEvent(void* self, intptr_t slot);
void QWebPage_virtualbase_TimerEvent(void* self, QTimerEvent* event);
void QWebPage_override_virtual_ChildEvent(void* self, intptr_t slot);
void QWebPage_virtualbase_ChildEvent(void* self, QChildEvent* event);
void QWebPage_override_virtual_CustomEvent(void* self, intptr_t slot);
void QWebPage_virtualbase_CustomEvent(void* self, QEvent* event);
void QWebPage_override_virtual_ConnectNotify(void* self, intptr_t slot);
void QWebPage_virtualbase_ConnectNotify(void* self, QMetaMethod* signal);
void QWebPage_override_virtual_DisconnectNotify(void* self, intptr_t slot);
void QWebPage_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal);
void QWebPage_Delete(QWebPage* self, bool isSubclass);
void QWebPage__ViewportAttributes_new(QWebPage__ViewportAttributes** outptr_QWebPage__ViewportAttributes);
void QWebPage__ViewportAttributes_new2(QWebPage__ViewportAttributes* other, QWebPage__ViewportAttributes** outptr_QWebPage__ViewportAttributes);
void QWebPage__ViewportAttributes_OperatorAssign(QWebPage__ViewportAttributes* self, QWebPage__ViewportAttributes* other);
double QWebPage__ViewportAttributes_InitialScaleFactor(const QWebPage__ViewportAttributes* self);
double QWebPage__ViewportAttributes_MinimumScaleFactor(const QWebPage__ViewportAttributes* self);
double QWebPage__ViewportAttributes_MaximumScaleFactor(const QWebPage__ViewportAttributes* self);
double QWebPage__ViewportAttributes_DevicePixelRatio(const QWebPage__ViewportAttributes* self);
bool QWebPage__ViewportAttributes_IsUserScalable(const QWebPage__ViewportAttributes* self);
bool QWebPage__ViewportAttributes_IsValid(const QWebPage__ViewportAttributes* self);
QSizeF* QWebPage__ViewportAttributes_Size(const QWebPage__ViewportAttributes* self);
void QWebPage__ViewportAttributes_Delete(QWebPage__ViewportAttributes* self, bool isSubclass);
void QWebPage__ExtensionOption_new(QWebPage__ExtensionOption* param1, QWebPage__ExtensionOption** outptr_QWebPage__ExtensionOption);
void QWebPage__ExtensionOption_Delete(QWebPage__ExtensionOption* self, bool isSubclass);
void QWebPage__ExtensionReturn_new(QWebPage__ExtensionReturn* param1, QWebPage__ExtensionReturn** outptr_QWebPage__ExtensionReturn);
void QWebPage__ExtensionReturn_new2(QWebPage__ExtensionReturn** outptr_QWebPage__ExtensionReturn);
void QWebPage__ExtensionReturn_Delete(QWebPage__ExtensionReturn* self, bool isSubclass);
void QWebPage__ChooseMultipleFilesExtensionOption_Delete(QWebPage__ChooseMultipleFilesExtensionOption* self, bool isSubclass);
void QWebPage__ChooseMultipleFilesExtensionReturn_Delete(QWebPage__ChooseMultipleFilesExtensionReturn* self, bool isSubclass);
void QWebPage__ErrorPageExtensionOption_new(QWebPage__ErrorPageExtensionOption* param1, QWebPage__ErrorPageExtensionOption** outptr_QWebPage__ErrorPageExtensionOption, QWebPage__ExtensionOption** outptr_QWebPage__ExtensionOption);
void QWebPage__ErrorPageExtensionOption_OperatorAssign(QWebPage__ErrorPageExtensionOption* self, QWebPage__ErrorPageExtensionOption* param1);
void QWebPage__ErrorPageExtensionOption_Delete(QWebPage__ErrorPageExtensionOption* self, bool isSubclass);
void QWebPage__ErrorPageExtensionReturn_new(QWebPage__ErrorPageExtensionReturn** outptr_QWebPage__ErrorPageExtensionReturn, QWebPage__ExtensionReturn** outptr_QWebPage__ExtensionReturn);
void QWebPage__ErrorPageExtensionReturn_new2(QWebPage__ErrorPageExtensionReturn* param1, QWebPage__ErrorPageExtensionReturn** outptr_QWebPage__ErrorPageExtensionReturn, QWebPage__ExtensionReturn** outptr_QWebPage__ExtensionReturn);
void QWebPage__ErrorPageExtensionReturn_OperatorAssign(QWebPage__ErrorPageExtensionReturn* self, QWebPage__ErrorPageExtensionReturn* param1);
void QWebPage__ErrorPageExtensionReturn_Delete(QWebPage__ErrorPageExtensionReturn* self, bool isSubclass);
#ifdef __cplusplus
} /* extern C */
#endif
#endif

View File

@ -0,0 +1,639 @@
#include <QChildEvent>
#include <QEvent>
#include <QList>
#include <QMetaMethod>
#include <QMetaObject>
#include <QObject>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QTimerEvent>
#include <QUrl>
#include <QWebPluginFactory>
#define WORKAROUND_INNER_CLASS_DEFINITION_QWebPluginFactory__ExtensionOption
#define WORKAROUND_INNER_CLASS_DEFINITION_QWebPluginFactory__ExtensionReturn
#define WORKAROUND_INNER_CLASS_DEFINITION_QWebPluginFactory__MimeType
#define WORKAROUND_INNER_CLASS_DEFINITION_QWebPluginFactory__Plugin
#include <qwebpluginfactory.h>
#include "gen_qwebpluginfactory.h"
#include "_cgo_export.h"
class MiqtVirtualQWebPluginFactory : public virtual QWebPluginFactory {
public:
MiqtVirtualQWebPluginFactory(): QWebPluginFactory() {};
MiqtVirtualQWebPluginFactory(QObject* parent): QWebPluginFactory(parent) {};
virtual ~MiqtVirtualQWebPluginFactory() = default;
// cgo.Handle value for overwritten implementation
intptr_t handle__Plugins = 0;
// Subclass to allow providing a Go implementation
virtual QList<QWebPluginFactory::Plugin> plugins() const override {
if (handle__Plugins == 0) {
return QList<QWebPluginFactory::Plugin>(); // Pure virtual, there is no base we can call
}
struct miqt_array /* of QWebPluginFactory__Plugin* */ callback_return_value = miqt_exec_callback_QWebPluginFactory_Plugins(const_cast<MiqtVirtualQWebPluginFactory*>(this), handle__Plugins);
QList<QWebPluginFactory::Plugin> callback_return_value_QList;
callback_return_value_QList.reserve(callback_return_value.len);
QWebPluginFactory__Plugin** callback_return_value_arr = static_cast<QWebPluginFactory__Plugin**>(callback_return_value.data);
for(size_t i = 0; i < callback_return_value.len; ++i) {
callback_return_value_QList.push_back(*(callback_return_value_arr[i]));
}
return callback_return_value_QList;
}
// cgo.Handle value for overwritten implementation
intptr_t handle__RefreshPlugins = 0;
// Subclass to allow providing a Go implementation
virtual void refreshPlugins() override {
if (handle__RefreshPlugins == 0) {
QWebPluginFactory::refreshPlugins();
return;
}
miqt_exec_callback_QWebPluginFactory_RefreshPlugins(this, handle__RefreshPlugins);
}
// Wrapper to allow calling protected method
void virtualbase_RefreshPlugins() {
QWebPluginFactory::refreshPlugins();
}
// cgo.Handle value for overwritten implementation
intptr_t handle__Create = 0;
// Subclass to allow providing a Go implementation
virtual QObject* create(const QString& mimeType, const QUrl& param2, const QStringList& argumentNames, const QStringList& argumentValues) const override {
if (handle__Create == 0) {
return nullptr; // Pure virtual, there is no base we can call
}
const QString mimeType_ret = mimeType;
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray mimeType_b = mimeType_ret.toUtf8();
struct miqt_string mimeType_ms;
mimeType_ms.len = mimeType_b.length();
mimeType_ms.data = static_cast<char*>(malloc(mimeType_ms.len));
memcpy(mimeType_ms.data, mimeType_b.data(), mimeType_ms.len);
struct miqt_string sigval1 = mimeType_ms;
const QUrl& param2_ret = param2;
// Cast returned reference into pointer
QUrl* sigval2 = const_cast<QUrl*>(&param2_ret);
const QStringList& argumentNames_ret = argumentNames;
// Convert QList<> from C++ memory to manually-managed C memory
struct miqt_string* argumentNames_arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * argumentNames_ret.length()));
for (size_t i = 0, e = argumentNames_ret.length(); i < e; ++i) {
QString argumentNames_lv_ret = argumentNames_ret[i];
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray argumentNames_lv_b = argumentNames_lv_ret.toUtf8();
struct miqt_string argumentNames_lv_ms;
argumentNames_lv_ms.len = argumentNames_lv_b.length();
argumentNames_lv_ms.data = static_cast<char*>(malloc(argumentNames_lv_ms.len));
memcpy(argumentNames_lv_ms.data, argumentNames_lv_b.data(), argumentNames_lv_ms.len);
argumentNames_arr[i] = argumentNames_lv_ms;
}
struct miqt_array argumentNames_out;
argumentNames_out.len = argumentNames_ret.length();
argumentNames_out.data = static_cast<void*>(argumentNames_arr);
struct miqt_array /* of struct miqt_string */ sigval3 = argumentNames_out;
const QStringList& argumentValues_ret = argumentValues;
// Convert QList<> from C++ memory to manually-managed C memory
struct miqt_string* argumentValues_arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * argumentValues_ret.length()));
for (size_t i = 0, e = argumentValues_ret.length(); i < e; ++i) {
QString argumentValues_lv_ret = argumentValues_ret[i];
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray argumentValues_lv_b = argumentValues_lv_ret.toUtf8();
struct miqt_string argumentValues_lv_ms;
argumentValues_lv_ms.len = argumentValues_lv_b.length();
argumentValues_lv_ms.data = static_cast<char*>(malloc(argumentValues_lv_ms.len));
memcpy(argumentValues_lv_ms.data, argumentValues_lv_b.data(), argumentValues_lv_ms.len);
argumentValues_arr[i] = argumentValues_lv_ms;
}
struct miqt_array argumentValues_out;
argumentValues_out.len = argumentValues_ret.length();
argumentValues_out.data = static_cast<void*>(argumentValues_arr);
struct miqt_array /* of struct miqt_string */ sigval4 = argumentValues_out;
QObject* callback_return_value = miqt_exec_callback_QWebPluginFactory_Create(const_cast<MiqtVirtualQWebPluginFactory*>(this), handle__Create, sigval1, sigval2, sigval3, sigval4);
return callback_return_value;
}
// cgo.Handle value for overwritten implementation
intptr_t handle__Extension = 0;
// Subclass to allow providing a Go implementation
virtual bool extension(QWebPluginFactory::Extension extension, const QWebPluginFactory::ExtensionOption* option, QWebPluginFactory::ExtensionReturn* output) override {
if (handle__Extension == 0) {
return QWebPluginFactory::extension(extension, option, output);
}
QWebPluginFactory::Extension extension_ret = extension;
int sigval1 = static_cast<int>(extension_ret);
QWebPluginFactory__ExtensionOption* sigval2 = (QWebPluginFactory__ExtensionOption*) option;
QWebPluginFactory__ExtensionReturn* sigval3 = output;
bool callback_return_value = miqt_exec_callback_QWebPluginFactory_Extension(this, handle__Extension, sigval1, sigval2, sigval3);
return callback_return_value;
}
// Wrapper to allow calling protected method
bool virtualbase_Extension(int extension, QWebPluginFactory__ExtensionOption* option, QWebPluginFactory__ExtensionReturn* output) {
return QWebPluginFactory::extension(static_cast<QWebPluginFactory::Extension>(extension), option, output);
}
// cgo.Handle value for overwritten implementation
intptr_t handle__SupportsExtension = 0;
// Subclass to allow providing a Go implementation
virtual bool supportsExtension(QWebPluginFactory::Extension extension) const override {
if (handle__SupportsExtension == 0) {
return QWebPluginFactory::supportsExtension(extension);
}
QWebPluginFactory::Extension extension_ret = extension;
int sigval1 = static_cast<int>(extension_ret);
bool callback_return_value = miqt_exec_callback_QWebPluginFactory_SupportsExtension(const_cast<MiqtVirtualQWebPluginFactory*>(this), handle__SupportsExtension, sigval1);
return callback_return_value;
}
// Wrapper to allow calling protected method
bool virtualbase_SupportsExtension(int extension) const {
return QWebPluginFactory::supportsExtension(static_cast<QWebPluginFactory::Extension>(extension));
}
// 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 QWebPluginFactory::event(event);
}
QEvent* sigval1 = event;
bool callback_return_value = miqt_exec_callback_QWebPluginFactory_Event(this, handle__Event, sigval1);
return callback_return_value;
}
// Wrapper to allow calling protected method
bool virtualbase_Event(QEvent* event) {
return QWebPluginFactory::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 QWebPluginFactory::eventFilter(watched, event);
}
QObject* sigval1 = watched;
QEvent* sigval2 = event;
bool callback_return_value = miqt_exec_callback_QWebPluginFactory_EventFilter(this, handle__EventFilter, sigval1, sigval2);
return callback_return_value;
}
// Wrapper to allow calling protected method
bool virtualbase_EventFilter(QObject* watched, QEvent* event) {
return QWebPluginFactory::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) {
QWebPluginFactory::timerEvent(event);
return;
}
QTimerEvent* sigval1 = event;
miqt_exec_callback_QWebPluginFactory_TimerEvent(this, handle__TimerEvent, sigval1);
}
// Wrapper to allow calling protected method
void virtualbase_TimerEvent(QTimerEvent* event) {
QWebPluginFactory::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) {
QWebPluginFactory::childEvent(event);
return;
}
QChildEvent* sigval1 = event;
miqt_exec_callback_QWebPluginFactory_ChildEvent(this, handle__ChildEvent, sigval1);
}
// Wrapper to allow calling protected method
void virtualbase_ChildEvent(QChildEvent* event) {
QWebPluginFactory::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) {
QWebPluginFactory::customEvent(event);
return;
}
QEvent* sigval1 = event;
miqt_exec_callback_QWebPluginFactory_CustomEvent(this, handle__CustomEvent, sigval1);
}
// Wrapper to allow calling protected method
void virtualbase_CustomEvent(QEvent* event) {
QWebPluginFactory::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) {
QWebPluginFactory::connectNotify(signal);
return;
}
const QMetaMethod& signal_ret = signal;
// Cast returned reference into pointer
QMetaMethod* sigval1 = const_cast<QMetaMethod*>(&signal_ret);
miqt_exec_callback_QWebPluginFactory_ConnectNotify(this, handle__ConnectNotify, sigval1);
}
// Wrapper to allow calling protected method
void virtualbase_ConnectNotify(QMetaMethod* signal) {
QWebPluginFactory::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) {
QWebPluginFactory::disconnectNotify(signal);
return;
}
const QMetaMethod& signal_ret = signal;
// Cast returned reference into pointer
QMetaMethod* sigval1 = const_cast<QMetaMethod*>(&signal_ret);
miqt_exec_callback_QWebPluginFactory_DisconnectNotify(this, handle__DisconnectNotify, sigval1);
}
// Wrapper to allow calling protected method
void virtualbase_DisconnectNotify(QMetaMethod* signal) {
QWebPluginFactory::disconnectNotify(*signal);
}
};
void QWebPluginFactory_new(QWebPluginFactory** outptr_QWebPluginFactory, QObject** outptr_QObject) {
MiqtVirtualQWebPluginFactory* ret = new MiqtVirtualQWebPluginFactory();
*outptr_QWebPluginFactory = ret;
*outptr_QObject = static_cast<QObject*>(ret);
}
void QWebPluginFactory_new2(QObject* parent, QWebPluginFactory** outptr_QWebPluginFactory, QObject** outptr_QObject) {
MiqtVirtualQWebPluginFactory* ret = new MiqtVirtualQWebPluginFactory(parent);
*outptr_QWebPluginFactory = ret;
*outptr_QObject = static_cast<QObject*>(ret);
}
QMetaObject* QWebPluginFactory_MetaObject(const QWebPluginFactory* self) {
return (QMetaObject*) self->metaObject();
}
void* QWebPluginFactory_Metacast(QWebPluginFactory* self, const char* param1) {
return self->qt_metacast(param1);
}
struct miqt_string QWebPluginFactory_Tr(const char* s) {
QString _ret = QWebPluginFactory::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 QWebPluginFactory_TrUtf8(const char* s) {
QString _ret = QWebPluginFactory::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_array /* of QWebPluginFactory__Plugin* */ QWebPluginFactory_Plugins(const QWebPluginFactory* self) {
QList<QWebPluginFactory::Plugin> _ret = self->plugins();
// Convert QList<> from C++ memory to manually-managed C memory
QWebPluginFactory__Plugin** _arr = static_cast<QWebPluginFactory__Plugin**>(malloc(sizeof(QWebPluginFactory__Plugin*) * _ret.length()));
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
_arr[i] = new QWebPluginFactory::Plugin(_ret[i]);
}
struct miqt_array _out;
_out.len = _ret.length();
_out.data = static_cast<void*>(_arr);
return _out;
}
void QWebPluginFactory_RefreshPlugins(QWebPluginFactory* self) {
self->refreshPlugins();
}
QObject* QWebPluginFactory_Create(const QWebPluginFactory* self, struct miqt_string mimeType, QUrl* param2, struct miqt_array /* of struct miqt_string */ argumentNames, struct miqt_array /* of struct miqt_string */ argumentValues) {
QString mimeType_QString = QString::fromUtf8(mimeType.data, mimeType.len);
QStringList argumentNames_QList;
argumentNames_QList.reserve(argumentNames.len);
struct miqt_string* argumentNames_arr = static_cast<struct miqt_string*>(argumentNames.data);
for(size_t i = 0; i < argumentNames.len; ++i) {
QString argumentNames_arr_i_QString = QString::fromUtf8(argumentNames_arr[i].data, argumentNames_arr[i].len);
argumentNames_QList.push_back(argumentNames_arr_i_QString);
}
QStringList argumentValues_QList;
argumentValues_QList.reserve(argumentValues.len);
struct miqt_string* argumentValues_arr = static_cast<struct miqt_string*>(argumentValues.data);
for(size_t i = 0; i < argumentValues.len; ++i) {
QString argumentValues_arr_i_QString = QString::fromUtf8(argumentValues_arr[i].data, argumentValues_arr[i].len);
argumentValues_QList.push_back(argumentValues_arr_i_QString);
}
return self->create(mimeType_QString, *param2, argumentNames_QList, argumentValues_QList);
}
bool QWebPluginFactory_Extension(QWebPluginFactory* self, int extension, QWebPluginFactory__ExtensionOption* option, QWebPluginFactory__ExtensionReturn* output) {
return self->extension(static_cast<QWebPluginFactory::Extension>(extension), option, output);
}
bool QWebPluginFactory_SupportsExtension(const QWebPluginFactory* self, int extension) {
return self->supportsExtension(static_cast<QWebPluginFactory::Extension>(extension));
}
struct miqt_string QWebPluginFactory_Tr2(const char* s, const char* c) {
QString _ret = QWebPluginFactory::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 QWebPluginFactory_Tr3(const char* s, const char* c, int n) {
QString _ret = QWebPluginFactory::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 QWebPluginFactory_TrUtf82(const char* s, const char* c) {
QString _ret = QWebPluginFactory::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 QWebPluginFactory_TrUtf83(const char* s, const char* c, int n) {
QString _ret = QWebPluginFactory::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 QWebPluginFactory_override_virtual_Plugins(void* self, intptr_t slot) {
dynamic_cast<MiqtVirtualQWebPluginFactory*>( (QWebPluginFactory*)(self) )->handle__Plugins = slot;
}
void QWebPluginFactory_override_virtual_RefreshPlugins(void* self, intptr_t slot) {
dynamic_cast<MiqtVirtualQWebPluginFactory*>( (QWebPluginFactory*)(self) )->handle__RefreshPlugins = slot;
}
void QWebPluginFactory_virtualbase_RefreshPlugins(void* self) {
( (MiqtVirtualQWebPluginFactory*)(self) )->virtualbase_RefreshPlugins();
}
void QWebPluginFactory_override_virtual_Create(void* self, intptr_t slot) {
dynamic_cast<MiqtVirtualQWebPluginFactory*>( (QWebPluginFactory*)(self) )->handle__Create = slot;
}
void QWebPluginFactory_override_virtual_Extension(void* self, intptr_t slot) {
dynamic_cast<MiqtVirtualQWebPluginFactory*>( (QWebPluginFactory*)(self) )->handle__Extension = slot;
}
bool QWebPluginFactory_virtualbase_Extension(void* self, int extension, QWebPluginFactory__ExtensionOption* option, QWebPluginFactory__ExtensionReturn* output) {
return ( (MiqtVirtualQWebPluginFactory*)(self) )->virtualbase_Extension(extension, option, output);
}
void QWebPluginFactory_override_virtual_SupportsExtension(void* self, intptr_t slot) {
dynamic_cast<MiqtVirtualQWebPluginFactory*>( (QWebPluginFactory*)(self) )->handle__SupportsExtension = slot;
}
bool QWebPluginFactory_virtualbase_SupportsExtension(const void* self, int extension) {
return ( (const MiqtVirtualQWebPluginFactory*)(self) )->virtualbase_SupportsExtension(extension);
}
void QWebPluginFactory_override_virtual_Event(void* self, intptr_t slot) {
dynamic_cast<MiqtVirtualQWebPluginFactory*>( (QWebPluginFactory*)(self) )->handle__Event = slot;
}
bool QWebPluginFactory_virtualbase_Event(void* self, QEvent* event) {
return ( (MiqtVirtualQWebPluginFactory*)(self) )->virtualbase_Event(event);
}
void QWebPluginFactory_override_virtual_EventFilter(void* self, intptr_t slot) {
dynamic_cast<MiqtVirtualQWebPluginFactory*>( (QWebPluginFactory*)(self) )->handle__EventFilter = slot;
}
bool QWebPluginFactory_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) {
return ( (MiqtVirtualQWebPluginFactory*)(self) )->virtualbase_EventFilter(watched, event);
}
void QWebPluginFactory_override_virtual_TimerEvent(void* self, intptr_t slot) {
dynamic_cast<MiqtVirtualQWebPluginFactory*>( (QWebPluginFactory*)(self) )->handle__TimerEvent = slot;
}
void QWebPluginFactory_virtualbase_TimerEvent(void* self, QTimerEvent* event) {
( (MiqtVirtualQWebPluginFactory*)(self) )->virtualbase_TimerEvent(event);
}
void QWebPluginFactory_override_virtual_ChildEvent(void* self, intptr_t slot) {
dynamic_cast<MiqtVirtualQWebPluginFactory*>( (QWebPluginFactory*)(self) )->handle__ChildEvent = slot;
}
void QWebPluginFactory_virtualbase_ChildEvent(void* self, QChildEvent* event) {
( (MiqtVirtualQWebPluginFactory*)(self) )->virtualbase_ChildEvent(event);
}
void QWebPluginFactory_override_virtual_CustomEvent(void* self, intptr_t slot) {
dynamic_cast<MiqtVirtualQWebPluginFactory*>( (QWebPluginFactory*)(self) )->handle__CustomEvent = slot;
}
void QWebPluginFactory_virtualbase_CustomEvent(void* self, QEvent* event) {
( (MiqtVirtualQWebPluginFactory*)(self) )->virtualbase_CustomEvent(event);
}
void QWebPluginFactory_override_virtual_ConnectNotify(void* self, intptr_t slot) {
dynamic_cast<MiqtVirtualQWebPluginFactory*>( (QWebPluginFactory*)(self) )->handle__ConnectNotify = slot;
}
void QWebPluginFactory_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) {
( (MiqtVirtualQWebPluginFactory*)(self) )->virtualbase_ConnectNotify(signal);
}
void QWebPluginFactory_override_virtual_DisconnectNotify(void* self, intptr_t slot) {
dynamic_cast<MiqtVirtualQWebPluginFactory*>( (QWebPluginFactory*)(self) )->handle__DisconnectNotify = slot;
}
void QWebPluginFactory_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) {
( (MiqtVirtualQWebPluginFactory*)(self) )->virtualbase_DisconnectNotify(signal);
}
void QWebPluginFactory_Delete(QWebPluginFactory* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<MiqtVirtualQWebPluginFactory*>( self );
} else {
delete self;
}
}
void QWebPluginFactory__MimeType_new(QWebPluginFactory__MimeType* param1, QWebPluginFactory__MimeType** outptr_QWebPluginFactory__MimeType) {
QWebPluginFactory::MimeType* ret = new QWebPluginFactory::MimeType(*param1);
*outptr_QWebPluginFactory__MimeType = ret;
}
bool QWebPluginFactory__MimeType_OperatorEqual(const QWebPluginFactory__MimeType* self, QWebPluginFactory__MimeType* other) {
return (*self == *other);
}
bool QWebPluginFactory__MimeType_OperatorNotEqual(const QWebPluginFactory__MimeType* self, QWebPluginFactory__MimeType* other) {
return (*self != *other);
}
void QWebPluginFactory__MimeType_OperatorAssign(QWebPluginFactory__MimeType* self, QWebPluginFactory__MimeType* param1) {
self->operator=(*param1);
}
void QWebPluginFactory__MimeType_Delete(QWebPluginFactory__MimeType* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QWebPluginFactory::MimeType*>( self );
} else {
delete self;
}
}
void QWebPluginFactory__Plugin_new(QWebPluginFactory__Plugin* param1, QWebPluginFactory__Plugin** outptr_QWebPluginFactory__Plugin) {
QWebPluginFactory::Plugin* ret = new QWebPluginFactory::Plugin(*param1);
*outptr_QWebPluginFactory__Plugin = ret;
}
void QWebPluginFactory__Plugin_OperatorAssign(QWebPluginFactory__Plugin* self, QWebPluginFactory__Plugin* param1) {
self->operator=(*param1);
}
void QWebPluginFactory__Plugin_Delete(QWebPluginFactory__Plugin* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QWebPluginFactory::Plugin*>( self );
} else {
delete self;
}
}
void QWebPluginFactory__ExtensionOption_Delete(QWebPluginFactory__ExtensionOption* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QWebPluginFactory::ExtensionOption*>( self );
} else {
delete self;
}
}
void QWebPluginFactory__ExtensionReturn_Delete(QWebPluginFactory__ExtensionReturn* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QWebPluginFactory::ExtensionReturn*>( self );
} else {
delete self;
}
}

View File

@ -0,0 +1,757 @@
package webkit
/*
#include "gen_qwebpluginfactory.h"
#include <stdlib.h>
*/
import "C"
import (
"github.com/mappu/miqt/qt"
"runtime"
"runtime/cgo"
"unsafe"
)
type QWebPluginFactory struct {
h *C.QWebPluginFactory
isSubclass bool
*qt.QObject
}
func (this *QWebPluginFactory) cPointer() *C.QWebPluginFactory {
if this == nil {
return nil
}
return this.h
}
func (this *QWebPluginFactory) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
// newQWebPluginFactory constructs the type using only CGO pointers.
func newQWebPluginFactory(h *C.QWebPluginFactory, h_QObject *C.QObject) *QWebPluginFactory {
if h == nil {
return nil
}
return &QWebPluginFactory{h: h,
QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))}
}
// UnsafeNewQWebPluginFactory constructs the type using only unsafe pointers.
func UnsafeNewQWebPluginFactory(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebPluginFactory {
if h == nil {
return nil
}
return &QWebPluginFactory{h: (*C.QWebPluginFactory)(h),
QObject: qt.UnsafeNewQObject(h_QObject)}
}
// NewQWebPluginFactory constructs a new QWebPluginFactory object.
func NewQWebPluginFactory() *QWebPluginFactory {
var outptr_QWebPluginFactory *C.QWebPluginFactory = nil
var outptr_QObject *C.QObject = nil
C.QWebPluginFactory_new(&outptr_QWebPluginFactory, &outptr_QObject)
ret := newQWebPluginFactory(outptr_QWebPluginFactory, outptr_QObject)
ret.isSubclass = true
return ret
}
// NewQWebPluginFactory2 constructs a new QWebPluginFactory object.
func NewQWebPluginFactory2(parent *qt.QObject) *QWebPluginFactory {
var outptr_QWebPluginFactory *C.QWebPluginFactory = nil
var outptr_QObject *C.QObject = nil
C.QWebPluginFactory_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QWebPluginFactory, &outptr_QObject)
ret := newQWebPluginFactory(outptr_QWebPluginFactory, outptr_QObject)
ret.isSubclass = true
return ret
}
func (this *QWebPluginFactory) MetaObject() *qt.QMetaObject {
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebPluginFactory_MetaObject(this.h)))
}
func (this *QWebPluginFactory) Metacast(param1 string) unsafe.Pointer {
param1_Cstring := C.CString(param1)
defer C.free(unsafe.Pointer(param1_Cstring))
return (unsafe.Pointer)(C.QWebPluginFactory_Metacast(this.h, param1_Cstring))
}
func QWebPluginFactory_Tr(s string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
var _ms C.struct_miqt_string = C.QWebPluginFactory_Tr(s_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QWebPluginFactory_TrUtf8(s string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
var _ms C.struct_miqt_string = C.QWebPluginFactory_TrUtf8(s_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QWebPluginFactory) Plugins() []QWebPluginFactory__Plugin {
var _ma C.struct_miqt_array = C.QWebPluginFactory_Plugins(this.h)
_ret := make([]QWebPluginFactory__Plugin, int(_ma.len))
_outCast := (*[0xffff]*C.QWebPluginFactory__Plugin)(unsafe.Pointer(_ma.data)) // hey ya
for i := 0; i < int(_ma.len); i++ {
_lv_ret := _outCast[i]
_lv_goptr := newQWebPluginFactory__Plugin(_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 *QWebPluginFactory) RefreshPlugins() {
C.QWebPluginFactory_RefreshPlugins(this.h)
}
func (this *QWebPluginFactory) Create(mimeType string, param2 *qt.QUrl, argumentNames []string, argumentValues []string) *qt.QObject {
mimeType_ms := C.struct_miqt_string{}
mimeType_ms.data = C.CString(mimeType)
mimeType_ms.len = C.size_t(len(mimeType))
defer C.free(unsafe.Pointer(mimeType_ms.data))
argumentNames_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(argumentNames))))
defer C.free(unsafe.Pointer(argumentNames_CArray))
for i := range argumentNames {
argumentNames_i_ms := C.struct_miqt_string{}
argumentNames_i_ms.data = C.CString(argumentNames[i])
argumentNames_i_ms.len = C.size_t(len(argumentNames[i]))
defer C.free(unsafe.Pointer(argumentNames_i_ms.data))
argumentNames_CArray[i] = argumentNames_i_ms
}
argumentNames_ma := C.struct_miqt_array{len: C.size_t(len(argumentNames)), data: unsafe.Pointer(argumentNames_CArray)}
argumentValues_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(argumentValues))))
defer C.free(unsafe.Pointer(argumentValues_CArray))
for i := range argumentValues {
argumentValues_i_ms := C.struct_miqt_string{}
argumentValues_i_ms.data = C.CString(argumentValues[i])
argumentValues_i_ms.len = C.size_t(len(argumentValues[i]))
defer C.free(unsafe.Pointer(argumentValues_i_ms.data))
argumentValues_CArray[i] = argumentValues_i_ms
}
argumentValues_ma := C.struct_miqt_array{len: C.size_t(len(argumentValues)), data: unsafe.Pointer(argumentValues_CArray)}
return qt.UnsafeNewQObject(unsafe.Pointer(C.QWebPluginFactory_Create(this.h, mimeType_ms, (*C.QUrl)(param2.UnsafePointer()), argumentNames_ma, argumentValues_ma)))
}
func (this *QWebPluginFactory) Extension(extension QWebPluginFactory__Extension, option *QWebPluginFactory__ExtensionOption, output *QWebPluginFactory__ExtensionReturn) bool {
return (bool)(C.QWebPluginFactory_Extension(this.h, (C.int)(extension), option.cPointer(), output.cPointer()))
}
func (this *QWebPluginFactory) SupportsExtension(extension QWebPluginFactory__Extension) bool {
return (bool)(C.QWebPluginFactory_SupportsExtension(this.h, (C.int)(extension)))
}
func QWebPluginFactory_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.QWebPluginFactory_Tr2(s_Cstring, c_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QWebPluginFactory_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.QWebPluginFactory_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 QWebPluginFactory_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.QWebPluginFactory_TrUtf82(s_Cstring, c_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QWebPluginFactory_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.QWebPluginFactory_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 *QWebPluginFactory) OnPlugins(slot func() []QWebPluginFactory__Plugin) {
C.QWebPluginFactory_override_virtual_Plugins(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QWebPluginFactory_Plugins
func miqt_exec_callback_QWebPluginFactory_Plugins(self *C.QWebPluginFactory, cb C.intptr_t) C.struct_miqt_array {
gofunc, ok := cgo.Handle(cb).Value().(func() []QWebPluginFactory__Plugin)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
virtualReturn := gofunc()
virtualReturn_CArray := (*[0xffff]*C.QWebPluginFactory__Plugin)(C.malloc(C.size_t(8 * len(virtualReturn))))
defer C.free(unsafe.Pointer(virtualReturn_CArray))
for i := range virtualReturn {
virtualReturn_CArray[i] = virtualReturn[i].cPointer()
}
virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)}
return virtualReturn_ma
}
func (this *QWebPluginFactory) callVirtualBase_RefreshPlugins() {
C.QWebPluginFactory_virtualbase_RefreshPlugins(unsafe.Pointer(this.h))
}
func (this *QWebPluginFactory) OnRefreshPlugins(slot func(super func())) {
C.QWebPluginFactory_override_virtual_RefreshPlugins(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QWebPluginFactory_RefreshPlugins
func miqt_exec_callback_QWebPluginFactory_RefreshPlugins(self *C.QWebPluginFactory, cb C.intptr_t) {
gofunc, ok := cgo.Handle(cb).Value().(func(super func()))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
gofunc((&QWebPluginFactory{h: self}).callVirtualBase_RefreshPlugins)
}
func (this *QWebPluginFactory) OnCreate(slot func(mimeType string, param2 *qt.QUrl, argumentNames []string, argumentValues []string) *qt.QObject) {
C.QWebPluginFactory_override_virtual_Create(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QWebPluginFactory_Create
func miqt_exec_callback_QWebPluginFactory_Create(self *C.QWebPluginFactory, cb C.intptr_t, mimeType C.struct_miqt_string, param2 *C.QUrl, argumentNames C.struct_miqt_array, argumentValues C.struct_miqt_array) *C.QObject {
gofunc, ok := cgo.Handle(cb).Value().(func(mimeType string, param2 *qt.QUrl, argumentNames []string, argumentValues []string) *qt.QObject)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
var mimeType_ms C.struct_miqt_string = mimeType
mimeType_ret := C.GoStringN(mimeType_ms.data, C.int(int64(mimeType_ms.len)))
C.free(unsafe.Pointer(mimeType_ms.data))
slotval1 := mimeType_ret
slotval2 := qt.UnsafeNewQUrl(unsafe.Pointer(param2))
var argumentNames_ma C.struct_miqt_array = argumentNames
argumentNames_ret := make([]string, int(argumentNames_ma.len))
argumentNames_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(argumentNames_ma.data)) // hey ya
for i := 0; i < int(argumentNames_ma.len); i++ {
var argumentNames_lv_ms C.struct_miqt_string = argumentNames_outCast[i]
argumentNames_lv_ret := C.GoStringN(argumentNames_lv_ms.data, C.int(int64(argumentNames_lv_ms.len)))
C.free(unsafe.Pointer(argumentNames_lv_ms.data))
argumentNames_ret[i] = argumentNames_lv_ret
}
slotval3 := argumentNames_ret
var argumentValues_ma C.struct_miqt_array = argumentValues
argumentValues_ret := make([]string, int(argumentValues_ma.len))
argumentValues_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(argumentValues_ma.data)) // hey ya
for i := 0; i < int(argumentValues_ma.len); i++ {
var argumentValues_lv_ms C.struct_miqt_string = argumentValues_outCast[i]
argumentValues_lv_ret := C.GoStringN(argumentValues_lv_ms.data, C.int(int64(argumentValues_lv_ms.len)))
C.free(unsafe.Pointer(argumentValues_lv_ms.data))
argumentValues_ret[i] = argumentValues_lv_ret
}
slotval4 := argumentValues_ret
virtualReturn := gofunc(slotval1, slotval2, slotval3, slotval4)
return (*C.QObject)(virtualReturn.UnsafePointer())
}
func (this *QWebPluginFactory) callVirtualBase_Extension(extension QWebPluginFactory__Extension, option *QWebPluginFactory__ExtensionOption, output *QWebPluginFactory__ExtensionReturn) bool {
return (bool)(C.QWebPluginFactory_virtualbase_Extension(unsafe.Pointer(this.h), (C.int)(extension), option.cPointer(), output.cPointer()))
}
func (this *QWebPluginFactory) OnExtension(slot func(super func(extension QWebPluginFactory__Extension, option *QWebPluginFactory__ExtensionOption, output *QWebPluginFactory__ExtensionReturn) bool, extension QWebPluginFactory__Extension, option *QWebPluginFactory__ExtensionOption, output *QWebPluginFactory__ExtensionReturn) bool) {
C.QWebPluginFactory_override_virtual_Extension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QWebPluginFactory_Extension
func miqt_exec_callback_QWebPluginFactory_Extension(self *C.QWebPluginFactory, cb C.intptr_t, extension C.int, option *C.QWebPluginFactory__ExtensionOption, output *C.QWebPluginFactory__ExtensionReturn) C.bool {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QWebPluginFactory__Extension, option *QWebPluginFactory__ExtensionOption, output *QWebPluginFactory__ExtensionReturn) bool, extension QWebPluginFactory__Extension, option *QWebPluginFactory__ExtensionOption, output *QWebPluginFactory__ExtensionReturn) bool)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := (QWebPluginFactory__Extension)(extension)
slotval2 := UnsafeNewQWebPluginFactory__ExtensionOption(unsafe.Pointer(option))
slotval3 := UnsafeNewQWebPluginFactory__ExtensionReturn(unsafe.Pointer(output))
virtualReturn := gofunc((&QWebPluginFactory{h: self}).callVirtualBase_Extension, slotval1, slotval2, slotval3)
return (C.bool)(virtualReturn)
}
func (this *QWebPluginFactory) callVirtualBase_SupportsExtension(extension QWebPluginFactory__Extension) bool {
return (bool)(C.QWebPluginFactory_virtualbase_SupportsExtension(unsafe.Pointer(this.h), (C.int)(extension)))
}
func (this *QWebPluginFactory) OnSupportsExtension(slot func(super func(extension QWebPluginFactory__Extension) bool, extension QWebPluginFactory__Extension) bool) {
C.QWebPluginFactory_override_virtual_SupportsExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QWebPluginFactory_SupportsExtension
func miqt_exec_callback_QWebPluginFactory_SupportsExtension(self *C.QWebPluginFactory, cb C.intptr_t, extension C.int) C.bool {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QWebPluginFactory__Extension) bool, extension QWebPluginFactory__Extension) bool)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := (QWebPluginFactory__Extension)(extension)
virtualReturn := gofunc((&QWebPluginFactory{h: self}).callVirtualBase_SupportsExtension, slotval1)
return (C.bool)(virtualReturn)
}
func (this *QWebPluginFactory) callVirtualBase_Event(event *qt.QEvent) bool {
return (bool)(C.QWebPluginFactory_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())))
}
func (this *QWebPluginFactory) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) {
C.QWebPluginFactory_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QWebPluginFactory_Event
func miqt_exec_callback_QWebPluginFactory_Event(self *C.QWebPluginFactory, 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((&QWebPluginFactory{h: self}).callVirtualBase_Event, slotval1)
return (C.bool)(virtualReturn)
}
func (this *QWebPluginFactory) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool {
return (bool)(C.QWebPluginFactory_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer())))
}
func (this *QWebPluginFactory) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) {
C.QWebPluginFactory_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QWebPluginFactory_EventFilter
func miqt_exec_callback_QWebPluginFactory_EventFilter(self *C.QWebPluginFactory, 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((&QWebPluginFactory{h: self}).callVirtualBase_EventFilter, slotval1, slotval2)
return (C.bool)(virtualReturn)
}
func (this *QWebPluginFactory) callVirtualBase_TimerEvent(event *qt.QTimerEvent) {
C.QWebPluginFactory_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer()))
}
func (this *QWebPluginFactory) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) {
C.QWebPluginFactory_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QWebPluginFactory_TimerEvent
func miqt_exec_callback_QWebPluginFactory_TimerEvent(self *C.QWebPluginFactory, 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((&QWebPluginFactory{h: self}).callVirtualBase_TimerEvent, slotval1)
}
func (this *QWebPluginFactory) callVirtualBase_ChildEvent(event *qt.QChildEvent) {
C.QWebPluginFactory_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer()))
}
func (this *QWebPluginFactory) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) {
C.QWebPluginFactory_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QWebPluginFactory_ChildEvent
func miqt_exec_callback_QWebPluginFactory_ChildEvent(self *C.QWebPluginFactory, 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((&QWebPluginFactory{h: self}).callVirtualBase_ChildEvent, slotval1)
}
func (this *QWebPluginFactory) callVirtualBase_CustomEvent(event *qt.QEvent) {
C.QWebPluginFactory_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))
}
func (this *QWebPluginFactory) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) {
C.QWebPluginFactory_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QWebPluginFactory_CustomEvent
func miqt_exec_callback_QWebPluginFactory_CustomEvent(self *C.QWebPluginFactory, 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((&QWebPluginFactory{h: self}).callVirtualBase_CustomEvent, slotval1)
}
func (this *QWebPluginFactory) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) {
C.QWebPluginFactory_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer()))
}
func (this *QWebPluginFactory) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) {
C.QWebPluginFactory_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QWebPluginFactory_ConnectNotify
func miqt_exec_callback_QWebPluginFactory_ConnectNotify(self *C.QWebPluginFactory, 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((&QWebPluginFactory{h: self}).callVirtualBase_ConnectNotify, slotval1)
}
func (this *QWebPluginFactory) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) {
C.QWebPluginFactory_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer()))
}
func (this *QWebPluginFactory) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) {
C.QWebPluginFactory_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QWebPluginFactory_DisconnectNotify
func miqt_exec_callback_QWebPluginFactory_DisconnectNotify(self *C.QWebPluginFactory, 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((&QWebPluginFactory{h: self}).callVirtualBase_DisconnectNotify, slotval1)
}
// Delete this object from C++ memory.
func (this *QWebPluginFactory) Delete() {
C.QWebPluginFactory_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 *QWebPluginFactory) GoGC() {
runtime.SetFinalizer(this, func(this *QWebPluginFactory) {
this.Delete()
runtime.KeepAlive(this.h)
})
}
type QWebPluginFactory__MimeType struct {
h *C.QWebPluginFactory__MimeType
isSubclass bool
}
func (this *QWebPluginFactory__MimeType) cPointer() *C.QWebPluginFactory__MimeType {
if this == nil {
return nil
}
return this.h
}
func (this *QWebPluginFactory__MimeType) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
// newQWebPluginFactory__MimeType constructs the type using only CGO pointers.
func newQWebPluginFactory__MimeType(h *C.QWebPluginFactory__MimeType) *QWebPluginFactory__MimeType {
if h == nil {
return nil
}
return &QWebPluginFactory__MimeType{h: h}
}
// UnsafeNewQWebPluginFactory__MimeType constructs the type using only unsafe pointers.
func UnsafeNewQWebPluginFactory__MimeType(h unsafe.Pointer) *QWebPluginFactory__MimeType {
if h == nil {
return nil
}
return &QWebPluginFactory__MimeType{h: (*C.QWebPluginFactory__MimeType)(h)}
}
// NewQWebPluginFactory__MimeType constructs a new QWebPluginFactory::MimeType object.
func NewQWebPluginFactory__MimeType(param1 *QWebPluginFactory__MimeType) *QWebPluginFactory__MimeType {
var outptr_QWebPluginFactory__MimeType *C.QWebPluginFactory__MimeType = nil
C.QWebPluginFactory__MimeType_new(param1.cPointer(), &outptr_QWebPluginFactory__MimeType)
ret := newQWebPluginFactory__MimeType(outptr_QWebPluginFactory__MimeType)
ret.isSubclass = true
return ret
}
func (this *QWebPluginFactory__MimeType) OperatorEqual(other *QWebPluginFactory__MimeType) bool {
return (bool)(C.QWebPluginFactory__MimeType_OperatorEqual(this.h, other.cPointer()))
}
func (this *QWebPluginFactory__MimeType) OperatorNotEqual(other *QWebPluginFactory__MimeType) bool {
return (bool)(C.QWebPluginFactory__MimeType_OperatorNotEqual(this.h, other.cPointer()))
}
func (this *QWebPluginFactory__MimeType) OperatorAssign(param1 *QWebPluginFactory__MimeType) {
C.QWebPluginFactory__MimeType_OperatorAssign(this.h, param1.cPointer())
}
// Delete this object from C++ memory.
func (this *QWebPluginFactory__MimeType) Delete() {
C.QWebPluginFactory__MimeType_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 *QWebPluginFactory__MimeType) GoGC() {
runtime.SetFinalizer(this, func(this *QWebPluginFactory__MimeType) {
this.Delete()
runtime.KeepAlive(this.h)
})
}
type QWebPluginFactory__Plugin struct {
h *C.QWebPluginFactory__Plugin
isSubclass bool
}
func (this *QWebPluginFactory__Plugin) cPointer() *C.QWebPluginFactory__Plugin {
if this == nil {
return nil
}
return this.h
}
func (this *QWebPluginFactory__Plugin) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
// newQWebPluginFactory__Plugin constructs the type using only CGO pointers.
func newQWebPluginFactory__Plugin(h *C.QWebPluginFactory__Plugin) *QWebPluginFactory__Plugin {
if h == nil {
return nil
}
return &QWebPluginFactory__Plugin{h: h}
}
// UnsafeNewQWebPluginFactory__Plugin constructs the type using only unsafe pointers.
func UnsafeNewQWebPluginFactory__Plugin(h unsafe.Pointer) *QWebPluginFactory__Plugin {
if h == nil {
return nil
}
return &QWebPluginFactory__Plugin{h: (*C.QWebPluginFactory__Plugin)(h)}
}
// NewQWebPluginFactory__Plugin constructs a new QWebPluginFactory::Plugin object.
func NewQWebPluginFactory__Plugin(param1 *QWebPluginFactory__Plugin) *QWebPluginFactory__Plugin {
var outptr_QWebPluginFactory__Plugin *C.QWebPluginFactory__Plugin = nil
C.QWebPluginFactory__Plugin_new(param1.cPointer(), &outptr_QWebPluginFactory__Plugin)
ret := newQWebPluginFactory__Plugin(outptr_QWebPluginFactory__Plugin)
ret.isSubclass = true
return ret
}
func (this *QWebPluginFactory__Plugin) OperatorAssign(param1 *QWebPluginFactory__Plugin) {
C.QWebPluginFactory__Plugin_OperatorAssign(this.h, param1.cPointer())
}
// Delete this object from C++ memory.
func (this *QWebPluginFactory__Plugin) Delete() {
C.QWebPluginFactory__Plugin_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 *QWebPluginFactory__Plugin) GoGC() {
runtime.SetFinalizer(this, func(this *QWebPluginFactory__Plugin) {
this.Delete()
runtime.KeepAlive(this.h)
})
}
type QWebPluginFactory__ExtensionOption struct {
h *C.QWebPluginFactory__ExtensionOption
isSubclass bool
}
func (this *QWebPluginFactory__ExtensionOption) cPointer() *C.QWebPluginFactory__ExtensionOption {
if this == nil {
return nil
}
return this.h
}
func (this *QWebPluginFactory__ExtensionOption) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
// newQWebPluginFactory__ExtensionOption constructs the type using only CGO pointers.
func newQWebPluginFactory__ExtensionOption(h *C.QWebPluginFactory__ExtensionOption) *QWebPluginFactory__ExtensionOption {
if h == nil {
return nil
}
return &QWebPluginFactory__ExtensionOption{h: h}
}
// UnsafeNewQWebPluginFactory__ExtensionOption constructs the type using only unsafe pointers.
func UnsafeNewQWebPluginFactory__ExtensionOption(h unsafe.Pointer) *QWebPluginFactory__ExtensionOption {
if h == nil {
return nil
}
return &QWebPluginFactory__ExtensionOption{h: (*C.QWebPluginFactory__ExtensionOption)(h)}
}
// Delete this object from C++ memory.
func (this *QWebPluginFactory__ExtensionOption) Delete() {
C.QWebPluginFactory__ExtensionOption_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 *QWebPluginFactory__ExtensionOption) GoGC() {
runtime.SetFinalizer(this, func(this *QWebPluginFactory__ExtensionOption) {
this.Delete()
runtime.KeepAlive(this.h)
})
}
type QWebPluginFactory__ExtensionReturn struct {
h *C.QWebPluginFactory__ExtensionReturn
isSubclass bool
}
func (this *QWebPluginFactory__ExtensionReturn) cPointer() *C.QWebPluginFactory__ExtensionReturn {
if this == nil {
return nil
}
return this.h
}
func (this *QWebPluginFactory__ExtensionReturn) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
// newQWebPluginFactory__ExtensionReturn constructs the type using only CGO pointers.
func newQWebPluginFactory__ExtensionReturn(h *C.QWebPluginFactory__ExtensionReturn) *QWebPluginFactory__ExtensionReturn {
if h == nil {
return nil
}
return &QWebPluginFactory__ExtensionReturn{h: h}
}
// UnsafeNewQWebPluginFactory__ExtensionReturn constructs the type using only unsafe pointers.
func UnsafeNewQWebPluginFactory__ExtensionReturn(h unsafe.Pointer) *QWebPluginFactory__ExtensionReturn {
if h == nil {
return nil
}
return &QWebPluginFactory__ExtensionReturn{h: (*C.QWebPluginFactory__ExtensionReturn)(h)}
}
// Delete this object from C++ memory.
func (this *QWebPluginFactory__ExtensionReturn) Delete() {
C.QWebPluginFactory__ExtensionReturn_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 *QWebPluginFactory__ExtensionReturn) GoGC() {
runtime.SetFinalizer(this, func(this *QWebPluginFactory__ExtensionReturn) {
this.Delete()
runtime.KeepAlive(this.h)
})
}

View File

@ -0,0 +1,120 @@
#pragma once
#ifndef MIQT_QT_WEBKIT_GEN_QWEBPLUGINFACTORY_H
#define MIQT_QT_WEBKIT_GEN_QWEBPLUGINFACTORY_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 QWebPluginFactory;
#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QWebPluginFactory__ExtensionOption)
typedef QWebPluginFactory::ExtensionOption QWebPluginFactory__ExtensionOption;
#else
class QWebPluginFactory__ExtensionOption;
#endif
#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QWebPluginFactory__ExtensionReturn)
typedef QWebPluginFactory::ExtensionReturn QWebPluginFactory__ExtensionReturn;
#else
class QWebPluginFactory__ExtensionReturn;
#endif
#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QWebPluginFactory__MimeType)
typedef QWebPluginFactory::MimeType QWebPluginFactory__MimeType;
#else
class QWebPluginFactory__MimeType;
#endif
#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QWebPluginFactory__Plugin)
typedef QWebPluginFactory::Plugin QWebPluginFactory__Plugin;
#else
class QWebPluginFactory__Plugin;
#endif
#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 QWebPluginFactory QWebPluginFactory;
typedef struct QWebPluginFactory__ExtensionOption QWebPluginFactory__ExtensionOption;
typedef struct QWebPluginFactory__ExtensionReturn QWebPluginFactory__ExtensionReturn;
typedef struct QWebPluginFactory__MimeType QWebPluginFactory__MimeType;
typedef struct QWebPluginFactory__Plugin QWebPluginFactory__Plugin;
#endif
void QWebPluginFactory_new(QWebPluginFactory** outptr_QWebPluginFactory, QObject** outptr_QObject);
void QWebPluginFactory_new2(QObject* parent, QWebPluginFactory** outptr_QWebPluginFactory, QObject** outptr_QObject);
QMetaObject* QWebPluginFactory_MetaObject(const QWebPluginFactory* self);
void* QWebPluginFactory_Metacast(QWebPluginFactory* self, const char* param1);
struct miqt_string QWebPluginFactory_Tr(const char* s);
struct miqt_string QWebPluginFactory_TrUtf8(const char* s);
struct miqt_array /* of QWebPluginFactory__Plugin* */ QWebPluginFactory_Plugins(const QWebPluginFactory* self);
void QWebPluginFactory_RefreshPlugins(QWebPluginFactory* self);
QObject* QWebPluginFactory_Create(const QWebPluginFactory* self, struct miqt_string mimeType, QUrl* param2, struct miqt_array /* of struct miqt_string */ argumentNames, struct miqt_array /* of struct miqt_string */ argumentValues);
bool QWebPluginFactory_Extension(QWebPluginFactory* self, int extension, QWebPluginFactory__ExtensionOption* option, QWebPluginFactory__ExtensionReturn* output);
bool QWebPluginFactory_SupportsExtension(const QWebPluginFactory* self, int extension);
struct miqt_string QWebPluginFactory_Tr2(const char* s, const char* c);
struct miqt_string QWebPluginFactory_Tr3(const char* s, const char* c, int n);
struct miqt_string QWebPluginFactory_TrUtf82(const char* s, const char* c);
struct miqt_string QWebPluginFactory_TrUtf83(const char* s, const char* c, int n);
void QWebPluginFactory_override_virtual_Plugins(void* self, intptr_t slot);
struct miqt_array /* of QWebPluginFactory__Plugin* */ QWebPluginFactory_virtualbase_Plugins(const void* self);
void QWebPluginFactory_override_virtual_RefreshPlugins(void* self, intptr_t slot);
void QWebPluginFactory_virtualbase_RefreshPlugins(void* self);
void QWebPluginFactory_override_virtual_Create(void* self, intptr_t slot);
QObject* QWebPluginFactory_virtualbase_Create(const void* self, struct miqt_string mimeType, QUrl* param2, struct miqt_array /* of struct miqt_string */ argumentNames, struct miqt_array /* of struct miqt_string */ argumentValues);
void QWebPluginFactory_override_virtual_Extension(void* self, intptr_t slot);
bool QWebPluginFactory_virtualbase_Extension(void* self, int extension, QWebPluginFactory__ExtensionOption* option, QWebPluginFactory__ExtensionReturn* output);
void QWebPluginFactory_override_virtual_SupportsExtension(void* self, intptr_t slot);
bool QWebPluginFactory_virtualbase_SupportsExtension(const void* self, int extension);
void QWebPluginFactory_override_virtual_Event(void* self, intptr_t slot);
bool QWebPluginFactory_virtualbase_Event(void* self, QEvent* event);
void QWebPluginFactory_override_virtual_EventFilter(void* self, intptr_t slot);
bool QWebPluginFactory_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event);
void QWebPluginFactory_override_virtual_TimerEvent(void* self, intptr_t slot);
void QWebPluginFactory_virtualbase_TimerEvent(void* self, QTimerEvent* event);
void QWebPluginFactory_override_virtual_ChildEvent(void* self, intptr_t slot);
void QWebPluginFactory_virtualbase_ChildEvent(void* self, QChildEvent* event);
void QWebPluginFactory_override_virtual_CustomEvent(void* self, intptr_t slot);
void QWebPluginFactory_virtualbase_CustomEvent(void* self, QEvent* event);
void QWebPluginFactory_override_virtual_ConnectNotify(void* self, intptr_t slot);
void QWebPluginFactory_virtualbase_ConnectNotify(void* self, QMetaMethod* signal);
void QWebPluginFactory_override_virtual_DisconnectNotify(void* self, intptr_t slot);
void QWebPluginFactory_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal);
void QWebPluginFactory_Delete(QWebPluginFactory* self, bool isSubclass);
void QWebPluginFactory__MimeType_new(QWebPluginFactory__MimeType* param1, QWebPluginFactory__MimeType** outptr_QWebPluginFactory__MimeType);
bool QWebPluginFactory__MimeType_OperatorEqual(const QWebPluginFactory__MimeType* self, QWebPluginFactory__MimeType* other);
bool QWebPluginFactory__MimeType_OperatorNotEqual(const QWebPluginFactory__MimeType* self, QWebPluginFactory__MimeType* other);
void QWebPluginFactory__MimeType_OperatorAssign(QWebPluginFactory__MimeType* self, QWebPluginFactory__MimeType* param1);
void QWebPluginFactory__MimeType_Delete(QWebPluginFactory__MimeType* self, bool isSubclass);
void QWebPluginFactory__Plugin_new(QWebPluginFactory__Plugin* param1, QWebPluginFactory__Plugin** outptr_QWebPluginFactory__Plugin);
void QWebPluginFactory__Plugin_OperatorAssign(QWebPluginFactory__Plugin* self, QWebPluginFactory__Plugin* param1);
void QWebPluginFactory__Plugin_Delete(QWebPluginFactory__Plugin* self, bool isSubclass);
void QWebPluginFactory__ExtensionOption_Delete(QWebPluginFactory__ExtensionOption* self, bool isSubclass);
void QWebPluginFactory__ExtensionReturn_Delete(QWebPluginFactory__ExtensionReturn* self, bool isSubclass);
#ifdef __cplusplus
} /* extern C */
#endif
#endif

View File

@ -0,0 +1,145 @@
#include <QList>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QUrl>
#include <QWebDatabase>
#include <QWebSecurityOrigin>
#include <qwebsecurityorigin.h>
#include "gen_qwebsecurityorigin.h"
#include "_cgo_export.h"
void QWebSecurityOrigin_new(QUrl* url, QWebSecurityOrigin** outptr_QWebSecurityOrigin) {
QWebSecurityOrigin* ret = new QWebSecurityOrigin(*url);
*outptr_QWebSecurityOrigin = ret;
}
void QWebSecurityOrigin_new2(QWebSecurityOrigin* other, QWebSecurityOrigin** outptr_QWebSecurityOrigin) {
QWebSecurityOrigin* ret = new QWebSecurityOrigin(*other);
*outptr_QWebSecurityOrigin = ret;
}
struct miqt_array /* of QWebSecurityOrigin* */ QWebSecurityOrigin_AllOrigins() {
QList<QWebSecurityOrigin> _ret = QWebSecurityOrigin::allOrigins();
// Convert QList<> from C++ memory to manually-managed C memory
QWebSecurityOrigin** _arr = static_cast<QWebSecurityOrigin**>(malloc(sizeof(QWebSecurityOrigin*) * _ret.length()));
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
_arr[i] = new QWebSecurityOrigin(_ret[i]);
}
struct miqt_array _out;
_out.len = _ret.length();
_out.data = static_cast<void*>(_arr);
return _out;
}
void QWebSecurityOrigin_AddLocalScheme(struct miqt_string scheme) {
QString scheme_QString = QString::fromUtf8(scheme.data, scheme.len);
QWebSecurityOrigin::addLocalScheme(scheme_QString);
}
void QWebSecurityOrigin_RemoveLocalScheme(struct miqt_string scheme) {
QString scheme_QString = QString::fromUtf8(scheme.data, scheme.len);
QWebSecurityOrigin::removeLocalScheme(scheme_QString);
}
struct miqt_array /* of struct miqt_string */ QWebSecurityOrigin_LocalSchemes() {
QStringList _ret = QWebSecurityOrigin::localSchemes();
// 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 QWebSecurityOrigin_AddAccessWhitelistEntry(QWebSecurityOrigin* self, struct miqt_string scheme, struct miqt_string host, int subdomainSetting) {
QString scheme_QString = QString::fromUtf8(scheme.data, scheme.len);
QString host_QString = QString::fromUtf8(host.data, host.len);
self->addAccessWhitelistEntry(scheme_QString, host_QString, static_cast<QWebSecurityOrigin::SubdomainSetting>(subdomainSetting));
}
void QWebSecurityOrigin_RemoveAccessWhitelistEntry(QWebSecurityOrigin* self, struct miqt_string scheme, struct miqt_string host, int subdomainSetting) {
QString scheme_QString = QString::fromUtf8(scheme.data, scheme.len);
QString host_QString = QString::fromUtf8(host.data, host.len);
self->removeAccessWhitelistEntry(scheme_QString, host_QString, static_cast<QWebSecurityOrigin::SubdomainSetting>(subdomainSetting));
}
struct miqt_string QWebSecurityOrigin_Scheme(const QWebSecurityOrigin* 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;
}
struct miqt_string QWebSecurityOrigin_Host(const QWebSecurityOrigin* self) {
QString _ret = self->host();
// Convert QString from UTF-16 in C++ RAII memory 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 QWebSecurityOrigin_Port(const QWebSecurityOrigin* self) {
return self->port();
}
long long QWebSecurityOrigin_DatabaseUsage(const QWebSecurityOrigin* self) {
qint64 _ret = self->databaseUsage();
return static_cast<long long>(_ret);
}
long long QWebSecurityOrigin_DatabaseQuota(const QWebSecurityOrigin* self) {
qint64 _ret = self->databaseQuota();
return static_cast<long long>(_ret);
}
void QWebSecurityOrigin_SetDatabaseQuota(QWebSecurityOrigin* self, long long quota) {
self->setDatabaseQuota(static_cast<qint64>(quota));
}
void QWebSecurityOrigin_SetApplicationCacheQuota(QWebSecurityOrigin* self, long long quota) {
self->setApplicationCacheQuota(static_cast<qint64>(quota));
}
struct miqt_array /* of QWebDatabase* */ QWebSecurityOrigin_Databases(const QWebSecurityOrigin* self) {
QList<QWebDatabase> _ret = self->databases();
// Convert QList<> from C++ memory to manually-managed C memory
QWebDatabase** _arr = static_cast<QWebDatabase**>(malloc(sizeof(QWebDatabase*) * _ret.length()));
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
_arr[i] = new QWebDatabase(_ret[i]);
}
struct miqt_array _out;
_out.len = _ret.length();
_out.data = static_cast<void*>(_arr);
return _out;
}
void QWebSecurityOrigin_OperatorAssign(QWebSecurityOrigin* self, QWebSecurityOrigin* other) {
self->operator=(*other);
}
void QWebSecurityOrigin_Delete(QWebSecurityOrigin* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QWebSecurityOrigin*>( self );
} else {
delete self;
}
}

View File

@ -0,0 +1,209 @@
package webkit
/*
#include "gen_qwebsecurityorigin.h"
#include <stdlib.h>
*/
import "C"
import (
"github.com/mappu/miqt/qt"
"runtime"
"unsafe"
)
type QWebSecurityOrigin__SubdomainSetting int
const (
QWebSecurityOrigin__AllowSubdomains QWebSecurityOrigin__SubdomainSetting = 0
QWebSecurityOrigin__DisallowSubdomains QWebSecurityOrigin__SubdomainSetting = 1
)
type QWebSecurityOrigin struct {
h *C.QWebSecurityOrigin
isSubclass bool
}
func (this *QWebSecurityOrigin) cPointer() *C.QWebSecurityOrigin {
if this == nil {
return nil
}
return this.h
}
func (this *QWebSecurityOrigin) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
// newQWebSecurityOrigin constructs the type using only CGO pointers.
func newQWebSecurityOrigin(h *C.QWebSecurityOrigin) *QWebSecurityOrigin {
if h == nil {
return nil
}
return &QWebSecurityOrigin{h: h}
}
// UnsafeNewQWebSecurityOrigin constructs the type using only unsafe pointers.
func UnsafeNewQWebSecurityOrigin(h unsafe.Pointer) *QWebSecurityOrigin {
if h == nil {
return nil
}
return &QWebSecurityOrigin{h: (*C.QWebSecurityOrigin)(h)}
}
// NewQWebSecurityOrigin constructs a new QWebSecurityOrigin object.
func NewQWebSecurityOrigin(url *qt.QUrl) *QWebSecurityOrigin {
var outptr_QWebSecurityOrigin *C.QWebSecurityOrigin = nil
C.QWebSecurityOrigin_new((*C.QUrl)(url.UnsafePointer()), &outptr_QWebSecurityOrigin)
ret := newQWebSecurityOrigin(outptr_QWebSecurityOrigin)
ret.isSubclass = true
return ret
}
// NewQWebSecurityOrigin2 constructs a new QWebSecurityOrigin object.
func NewQWebSecurityOrigin2(other *QWebSecurityOrigin) *QWebSecurityOrigin {
var outptr_QWebSecurityOrigin *C.QWebSecurityOrigin = nil
C.QWebSecurityOrigin_new2(other.cPointer(), &outptr_QWebSecurityOrigin)
ret := newQWebSecurityOrigin(outptr_QWebSecurityOrigin)
ret.isSubclass = true
return ret
}
func QWebSecurityOrigin_AllOrigins() []QWebSecurityOrigin {
var _ma C.struct_miqt_array = C.QWebSecurityOrigin_AllOrigins()
_ret := make([]QWebSecurityOrigin, int(_ma.len))
_outCast := (*[0xffff]*C.QWebSecurityOrigin)(unsafe.Pointer(_ma.data)) // hey ya
for i := 0; i < int(_ma.len); i++ {
_lv_ret := _outCast[i]
_lv_goptr := newQWebSecurityOrigin(_lv_ret)
_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
_ret[i] = *_lv_goptr
}
return _ret
}
func QWebSecurityOrigin_AddLocalScheme(scheme string) {
scheme_ms := C.struct_miqt_string{}
scheme_ms.data = C.CString(scheme)
scheme_ms.len = C.size_t(len(scheme))
defer C.free(unsafe.Pointer(scheme_ms.data))
C.QWebSecurityOrigin_AddLocalScheme(scheme_ms)
}
func QWebSecurityOrigin_RemoveLocalScheme(scheme string) {
scheme_ms := C.struct_miqt_string{}
scheme_ms.data = C.CString(scheme)
scheme_ms.len = C.size_t(len(scheme))
defer C.free(unsafe.Pointer(scheme_ms.data))
C.QWebSecurityOrigin_RemoveLocalScheme(scheme_ms)
}
func QWebSecurityOrigin_LocalSchemes() []string {
var _ma C.struct_miqt_array = C.QWebSecurityOrigin_LocalSchemes()
_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 *QWebSecurityOrigin) AddAccessWhitelistEntry(scheme string, host string, subdomainSetting QWebSecurityOrigin__SubdomainSetting) {
scheme_ms := C.struct_miqt_string{}
scheme_ms.data = C.CString(scheme)
scheme_ms.len = C.size_t(len(scheme))
defer C.free(unsafe.Pointer(scheme_ms.data))
host_ms := C.struct_miqt_string{}
host_ms.data = C.CString(host)
host_ms.len = C.size_t(len(host))
defer C.free(unsafe.Pointer(host_ms.data))
C.QWebSecurityOrigin_AddAccessWhitelistEntry(this.h, scheme_ms, host_ms, (C.int)(subdomainSetting))
}
func (this *QWebSecurityOrigin) RemoveAccessWhitelistEntry(scheme string, host string, subdomainSetting QWebSecurityOrigin__SubdomainSetting) {
scheme_ms := C.struct_miqt_string{}
scheme_ms.data = C.CString(scheme)
scheme_ms.len = C.size_t(len(scheme))
defer C.free(unsafe.Pointer(scheme_ms.data))
host_ms := C.struct_miqt_string{}
host_ms.data = C.CString(host)
host_ms.len = C.size_t(len(host))
defer C.free(unsafe.Pointer(host_ms.data))
C.QWebSecurityOrigin_RemoveAccessWhitelistEntry(this.h, scheme_ms, host_ms, (C.int)(subdomainSetting))
}
func (this *QWebSecurityOrigin) Scheme() string {
var _ms C.struct_miqt_string = C.QWebSecurityOrigin_Scheme(this.h)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QWebSecurityOrigin) Host() string {
var _ms C.struct_miqt_string = C.QWebSecurityOrigin_Host(this.h)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QWebSecurityOrigin) Port() int {
return (int)(C.QWebSecurityOrigin_Port(this.h))
}
func (this *QWebSecurityOrigin) DatabaseUsage() int64 {
return (int64)(C.QWebSecurityOrigin_DatabaseUsage(this.h))
}
func (this *QWebSecurityOrigin) DatabaseQuota() int64 {
return (int64)(C.QWebSecurityOrigin_DatabaseQuota(this.h))
}
func (this *QWebSecurityOrigin) SetDatabaseQuota(quota int64) {
C.QWebSecurityOrigin_SetDatabaseQuota(this.h, (C.longlong)(quota))
}
func (this *QWebSecurityOrigin) SetApplicationCacheQuota(quota int64) {
C.QWebSecurityOrigin_SetApplicationCacheQuota(this.h, (C.longlong)(quota))
}
func (this *QWebSecurityOrigin) Databases() []QWebDatabase {
var _ma C.struct_miqt_array = C.QWebSecurityOrigin_Databases(this.h)
_ret := make([]QWebDatabase, int(_ma.len))
_outCast := (*[0xffff]*C.QWebDatabase)(unsafe.Pointer(_ma.data)) // hey ya
for i := 0; i < int(_ma.len); i++ {
_lv_ret := _outCast[i]
_lv_goptr := newQWebDatabase(_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 *QWebSecurityOrigin) OperatorAssign(other *QWebSecurityOrigin) {
C.QWebSecurityOrigin_OperatorAssign(this.h, other.cPointer())
}
// Delete this object from C++ memory.
func (this *QWebSecurityOrigin) Delete() {
C.QWebSecurityOrigin_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 *QWebSecurityOrigin) GoGC() {
runtime.SetFinalizer(this, func(this *QWebSecurityOrigin) {
this.Delete()
runtime.KeepAlive(this.h)
})
}

View File

@ -0,0 +1,50 @@
#pragma once
#ifndef MIQT_QT_WEBKIT_GEN_QWEBSECURITYORIGIN_H
#define MIQT_QT_WEBKIT_GEN_QWEBSECURITYORIGIN_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 QWebDatabase;
class QWebSecurityOrigin;
#else
typedef struct QUrl QUrl;
typedef struct QWebDatabase QWebDatabase;
typedef struct QWebSecurityOrigin QWebSecurityOrigin;
#endif
void QWebSecurityOrigin_new(QUrl* url, QWebSecurityOrigin** outptr_QWebSecurityOrigin);
void QWebSecurityOrigin_new2(QWebSecurityOrigin* other, QWebSecurityOrigin** outptr_QWebSecurityOrigin);
struct miqt_array /* of QWebSecurityOrigin* */ QWebSecurityOrigin_AllOrigins();
void QWebSecurityOrigin_AddLocalScheme(struct miqt_string scheme);
void QWebSecurityOrigin_RemoveLocalScheme(struct miqt_string scheme);
struct miqt_array /* of struct miqt_string */ QWebSecurityOrigin_LocalSchemes();
void QWebSecurityOrigin_AddAccessWhitelistEntry(QWebSecurityOrigin* self, struct miqt_string scheme, struct miqt_string host, int subdomainSetting);
void QWebSecurityOrigin_RemoveAccessWhitelistEntry(QWebSecurityOrigin* self, struct miqt_string scheme, struct miqt_string host, int subdomainSetting);
struct miqt_string QWebSecurityOrigin_Scheme(const QWebSecurityOrigin* self);
struct miqt_string QWebSecurityOrigin_Host(const QWebSecurityOrigin* self);
int QWebSecurityOrigin_Port(const QWebSecurityOrigin* self);
long long QWebSecurityOrigin_DatabaseUsage(const QWebSecurityOrigin* self);
long long QWebSecurityOrigin_DatabaseQuota(const QWebSecurityOrigin* self);
void QWebSecurityOrigin_SetDatabaseQuota(QWebSecurityOrigin* self, long long quota);
void QWebSecurityOrigin_SetApplicationCacheQuota(QWebSecurityOrigin* self, long long quota);
struct miqt_array /* of QWebDatabase* */ QWebSecurityOrigin_Databases(const QWebSecurityOrigin* self);
void QWebSecurityOrigin_OperatorAssign(QWebSecurityOrigin* self, QWebSecurityOrigin* other);
void QWebSecurityOrigin_Delete(QWebSecurityOrigin* self, bool isSubclass);
#ifdef __cplusplus
} /* extern C */
#endif
#endif

View File

@ -0,0 +1,263 @@
#include <QIcon>
#include <QList>
#include <QPixmap>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QUrl>
#include <QWebSettings>
#include <qwebsettings.h>
#include "gen_qwebsettings.h"
#include "_cgo_export.h"
QWebSettings* QWebSettings_GlobalSettings() {
return QWebSettings::globalSettings();
}
void QWebSettings_SetFontFamily(QWebSettings* self, int which, struct miqt_string family) {
QString family_QString = QString::fromUtf8(family.data, family.len);
self->setFontFamily(static_cast<QWebSettings::FontFamily>(which), family_QString);
}
struct miqt_string QWebSettings_FontFamily(const QWebSettings* self, int which) {
QString _ret = self->fontFamily(static_cast<QWebSettings::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 QWebSettings_ResetFontFamily(QWebSettings* self, int which) {
self->resetFontFamily(static_cast<QWebSettings::FontFamily>(which));
}
void QWebSettings_SetFontSize(QWebSettings* self, int typeVal, int size) {
self->setFontSize(static_cast<QWebSettings::FontSize>(typeVal), static_cast<int>(size));
}
int QWebSettings_FontSize(const QWebSettings* self, int typeVal) {
return self->fontSize(static_cast<QWebSettings::FontSize>(typeVal));
}
void QWebSettings_ResetFontSize(QWebSettings* self, int typeVal) {
self->resetFontSize(static_cast<QWebSettings::FontSize>(typeVal));
}
void QWebSettings_SetAttribute(QWebSettings* self, int attr, bool on) {
self->setAttribute(static_cast<QWebSettings::WebAttribute>(attr), on);
}
bool QWebSettings_TestAttribute(const QWebSettings* self, int attr) {
return self->testAttribute(static_cast<QWebSettings::WebAttribute>(attr));
}
void QWebSettings_ResetAttribute(QWebSettings* self, int attr) {
self->resetAttribute(static_cast<QWebSettings::WebAttribute>(attr));
}
void QWebSettings_SetUserStyleSheetUrl(QWebSettings* self, QUrl* location) {
self->setUserStyleSheetUrl(*location);
}
QUrl* QWebSettings_UserStyleSheetUrl(const QWebSettings* self) {
return new QUrl(self->userStyleSheetUrl());
}
void QWebSettings_SetDefaultTextEncoding(QWebSettings* self, struct miqt_string encoding) {
QString encoding_QString = QString::fromUtf8(encoding.data, encoding.len);
self->setDefaultTextEncoding(encoding_QString);
}
struct miqt_string QWebSettings_DefaultTextEncoding(const QWebSettings* 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;
}
void QWebSettings_SetIconDatabasePath(struct miqt_string location) {
QString location_QString = QString::fromUtf8(location.data, location.len);
QWebSettings::setIconDatabasePath(location_QString);
}
struct miqt_string QWebSettings_IconDatabasePath() {
QString _ret = QWebSettings::iconDatabasePath();
// Convert QString from UTF-16 in C++ RAII memory 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 QWebSettings_ClearIconDatabase() {
QWebSettings::clearIconDatabase();
}
QIcon* QWebSettings_IconForUrl(QUrl* url) {
return new QIcon(QWebSettings::iconForUrl(*url));
}
void QWebSettings_SetPluginSearchPaths(struct miqt_array /* of struct miqt_string */ paths) {
QStringList paths_QList;
paths_QList.reserve(paths.len);
struct miqt_string* paths_arr = static_cast<struct miqt_string*>(paths.data);
for(size_t i = 0; i < paths.len; ++i) {
QString paths_arr_i_QString = QString::fromUtf8(paths_arr[i].data, paths_arr[i].len);
paths_QList.push_back(paths_arr_i_QString);
}
QWebSettings::setPluginSearchPaths(paths_QList);
}
struct miqt_array /* of struct miqt_string */ QWebSettings_PluginSearchPaths() {
QStringList _ret = QWebSettings::pluginSearchPaths();
// 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 QWebSettings_SetWebGraphic(int typeVal, QPixmap* graphic) {
QWebSettings::setWebGraphic(static_cast<QWebSettings::WebGraphic>(typeVal), *graphic);
}
QPixmap* QWebSettings_WebGraphic(int typeVal) {
return new QPixmap(QWebSettings::webGraphic(static_cast<QWebSettings::WebGraphic>(typeVal)));
}
void QWebSettings_SetMaximumPagesInCache(int pages) {
QWebSettings::setMaximumPagesInCache(static_cast<int>(pages));
}
int QWebSettings_MaximumPagesInCache() {
return QWebSettings::maximumPagesInCache();
}
void QWebSettings_SetObjectCacheCapacities(int cacheMinDeadCapacity, int cacheMaxDead, int totalCapacity) {
QWebSettings::setObjectCacheCapacities(static_cast<int>(cacheMinDeadCapacity), static_cast<int>(cacheMaxDead), static_cast<int>(totalCapacity));
}
void QWebSettings_SetOfflineStoragePath(struct miqt_string path) {
QString path_QString = QString::fromUtf8(path.data, path.len);
QWebSettings::setOfflineStoragePath(path_QString);
}
struct miqt_string QWebSettings_OfflineStoragePath() {
QString _ret = QWebSettings::offlineStoragePath();
// Convert QString from UTF-16 in C++ RAII memory 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 QWebSettings_SetOfflineStorageDefaultQuota(long long maximumSize) {
QWebSettings::setOfflineStorageDefaultQuota(static_cast<qint64>(maximumSize));
}
long long QWebSettings_OfflineStorageDefaultQuota() {
qint64 _ret = QWebSettings::offlineStorageDefaultQuota();
return static_cast<long long>(_ret);
}
void QWebSettings_SetOfflineWebApplicationCachePath(struct miqt_string path) {
QString path_QString = QString::fromUtf8(path.data, path.len);
QWebSettings::setOfflineWebApplicationCachePath(path_QString);
}
struct miqt_string QWebSettings_OfflineWebApplicationCachePath() {
QString _ret = QWebSettings::offlineWebApplicationCachePath();
// Convert QString from UTF-16 in C++ RAII memory 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 QWebSettings_SetOfflineWebApplicationCacheQuota(long long maximumSize) {
QWebSettings::setOfflineWebApplicationCacheQuota(static_cast<qint64>(maximumSize));
}
long long QWebSettings_OfflineWebApplicationCacheQuota() {
qint64 _ret = QWebSettings::offlineWebApplicationCacheQuota();
return static_cast<long long>(_ret);
}
void QWebSettings_SetLocalStoragePath(QWebSettings* self, struct miqt_string path) {
QString path_QString = QString::fromUtf8(path.data, path.len);
self->setLocalStoragePath(path_QString);
}
struct miqt_string QWebSettings_LocalStoragePath(const QWebSettings* self) {
QString _ret = self->localStoragePath();
// Convert QString from UTF-16 in C++ RAII memory 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 QWebSettings_ClearMemoryCaches() {
QWebSettings::clearMemoryCaches();
}
void QWebSettings_EnablePersistentStorage() {
QWebSettings::enablePersistentStorage();
}
void QWebSettings_SetThirdPartyCookiePolicy(QWebSettings* self, int thirdPartyCookiePolicy) {
self->setThirdPartyCookiePolicy(static_cast<QWebSettings::ThirdPartyCookiePolicy>(thirdPartyCookiePolicy));
}
int QWebSettings_ThirdPartyCookiePolicy(const QWebSettings* self) {
QWebSettings::ThirdPartyCookiePolicy _ret = self->thirdPartyCookiePolicy();
return static_cast<int>(_ret);
}
void QWebSettings_SetCSSMediaType(QWebSettings* self, struct miqt_string cSSMediaType) {
QString cSSMediaType_QString = QString::fromUtf8(cSSMediaType.data, cSSMediaType.len);
self->setCSSMediaType(cSSMediaType_QString);
}
struct miqt_string QWebSettings_CssMediaType(const QWebSettings* self) {
QString _ret = self->cssMediaType();
// Convert QString from UTF-16 in C++ RAII memory 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 QWebSettings_EnablePersistentStorage1(struct miqt_string path) {
QString path_QString = QString::fromUtf8(path.data, path.len);
QWebSettings::enablePersistentStorage(path_QString);
}

View File

@ -0,0 +1,386 @@
package webkit
/*
#include "gen_qwebsettings.h"
#include <stdlib.h>
*/
import "C"
import (
"github.com/mappu/miqt/qt"
"unsafe"
)
type QWebSettings__FontFamily int
const (
QWebSettings__StandardFont QWebSettings__FontFamily = 0
QWebSettings__FixedFont QWebSettings__FontFamily = 1
QWebSettings__SerifFont QWebSettings__FontFamily = 2
QWebSettings__SansSerifFont QWebSettings__FontFamily = 3
QWebSettings__CursiveFont QWebSettings__FontFamily = 4
QWebSettings__FantasyFont QWebSettings__FontFamily = 5
)
type QWebSettings__WebAttribute int
const (
QWebSettings__AutoLoadImages QWebSettings__WebAttribute = 0
QWebSettings__JavascriptEnabled QWebSettings__WebAttribute = 1
QWebSettings__JavaEnabled QWebSettings__WebAttribute = 2
QWebSettings__PluginsEnabled QWebSettings__WebAttribute = 3
QWebSettings__PrivateBrowsingEnabled QWebSettings__WebAttribute = 4
QWebSettings__JavascriptCanOpenWindows QWebSettings__WebAttribute = 5
QWebSettings__JavascriptCanAccessClipboard QWebSettings__WebAttribute = 6
QWebSettings__DeveloperExtrasEnabled QWebSettings__WebAttribute = 7
QWebSettings__LinksIncludedInFocusChain QWebSettings__WebAttribute = 8
QWebSettings__ZoomTextOnly QWebSettings__WebAttribute = 9
QWebSettings__PrintElementBackgrounds QWebSettings__WebAttribute = 10
QWebSettings__OfflineStorageDatabaseEnabled QWebSettings__WebAttribute = 11
QWebSettings__OfflineWebApplicationCacheEnabled QWebSettings__WebAttribute = 12
QWebSettings__LocalStorageEnabled QWebSettings__WebAttribute = 13
QWebSettings__LocalStorageDatabaseEnabled QWebSettings__WebAttribute = 13
QWebSettings__LocalContentCanAccessRemoteUrls QWebSettings__WebAttribute = 14
QWebSettings__DnsPrefetchEnabled QWebSettings__WebAttribute = 15
QWebSettings__XSSAuditingEnabled QWebSettings__WebAttribute = 16
QWebSettings__AcceleratedCompositingEnabled QWebSettings__WebAttribute = 17
QWebSettings__SpatialNavigationEnabled QWebSettings__WebAttribute = 18
QWebSettings__LocalContentCanAccessFileUrls QWebSettings__WebAttribute = 19
QWebSettings__TiledBackingStoreEnabled QWebSettings__WebAttribute = 20
QWebSettings__FrameFlatteningEnabled QWebSettings__WebAttribute = 21
QWebSettings__SiteSpecificQuirksEnabled QWebSettings__WebAttribute = 22
QWebSettings__JavascriptCanCloseWindows QWebSettings__WebAttribute = 23
QWebSettings__WebGLEnabled QWebSettings__WebAttribute = 24
QWebSettings__CSSRegionsEnabled QWebSettings__WebAttribute = 25
QWebSettings__HyperlinkAuditingEnabled QWebSettings__WebAttribute = 26
QWebSettings__CSSGridLayoutEnabled QWebSettings__WebAttribute = 27
QWebSettings__ScrollAnimatorEnabled QWebSettings__WebAttribute = 28
QWebSettings__CaretBrowsingEnabled QWebSettings__WebAttribute = 29
QWebSettings__NotificationsEnabled QWebSettings__WebAttribute = 30
QWebSettings__WebAudioEnabled QWebSettings__WebAttribute = 31
QWebSettings__Accelerated2dCanvasEnabled QWebSettings__WebAttribute = 32
QWebSettings__MediaSourceEnabled QWebSettings__WebAttribute = 33
QWebSettings__MediaEnabled QWebSettings__WebAttribute = 34
QWebSettings__WebSecurityEnabled QWebSettings__WebAttribute = 35
QWebSettings__FullScreenSupportEnabled QWebSettings__WebAttribute = 36
QWebSettings__ImagesEnabled QWebSettings__WebAttribute = 37
QWebSettings__AllowRunningInsecureContent QWebSettings__WebAttribute = 38
QWebSettings__ErrorPageEnabled QWebSettings__WebAttribute = 39
)
type QWebSettings__WebGraphic int
const (
QWebSettings__MissingImageGraphic QWebSettings__WebGraphic = 0
QWebSettings__MissingPluginGraphic QWebSettings__WebGraphic = 1
QWebSettings__DefaultFrameIconGraphic QWebSettings__WebGraphic = 2
QWebSettings__TextAreaSizeGripCornerGraphic QWebSettings__WebGraphic = 3
QWebSettings__DeleteButtonGraphic QWebSettings__WebGraphic = 4
QWebSettings__InputSpeechButtonGraphic QWebSettings__WebGraphic = 5
QWebSettings__SearchCancelButtonGraphic QWebSettings__WebGraphic = 6
QWebSettings__SearchCancelButtonPressedGraphic QWebSettings__WebGraphic = 7
)
type QWebSettings__FontSize int
const (
QWebSettings__MinimumFontSize QWebSettings__FontSize = 0
QWebSettings__MinimumLogicalFontSize QWebSettings__FontSize = 1
QWebSettings__DefaultFontSize QWebSettings__FontSize = 2
QWebSettings__DefaultFixedFontSize QWebSettings__FontSize = 3
)
type QWebSettings__ThirdPartyCookiePolicy int
const (
QWebSettings__AlwaysAllowThirdPartyCookies QWebSettings__ThirdPartyCookiePolicy = 0
QWebSettings__AlwaysBlockThirdPartyCookies QWebSettings__ThirdPartyCookiePolicy = 1
QWebSettings__AllowThirdPartyWithExistingCookies QWebSettings__ThirdPartyCookiePolicy = 2
)
type QWebSettings struct {
h *C.QWebSettings
isSubclass bool
}
func (this *QWebSettings) cPointer() *C.QWebSettings {
if this == nil {
return nil
}
return this.h
}
func (this *QWebSettings) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
// newQWebSettings constructs the type using only CGO pointers.
func newQWebSettings(h *C.QWebSettings) *QWebSettings {
if h == nil {
return nil
}
return &QWebSettings{h: h}
}
// UnsafeNewQWebSettings constructs the type using only unsafe pointers.
func UnsafeNewQWebSettings(h unsafe.Pointer) *QWebSettings {
if h == nil {
return nil
}
return &QWebSettings{h: (*C.QWebSettings)(h)}
}
func QWebSettings_GlobalSettings() *QWebSettings {
return UnsafeNewQWebSettings(unsafe.Pointer(C.QWebSettings_GlobalSettings()))
}
func (this *QWebSettings) SetFontFamily(which QWebSettings__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.QWebSettings_SetFontFamily(this.h, (C.int)(which), family_ms)
}
func (this *QWebSettings) FontFamily(which QWebSettings__FontFamily) string {
var _ms C.struct_miqt_string = C.QWebSettings_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 *QWebSettings) ResetFontFamily(which QWebSettings__FontFamily) {
C.QWebSettings_ResetFontFamily(this.h, (C.int)(which))
}
func (this *QWebSettings) SetFontSize(typeVal QWebSettings__FontSize, size int) {
C.QWebSettings_SetFontSize(this.h, (C.int)(typeVal), (C.int)(size))
}
func (this *QWebSettings) FontSize(typeVal QWebSettings__FontSize) int {
return (int)(C.QWebSettings_FontSize(this.h, (C.int)(typeVal)))
}
func (this *QWebSettings) ResetFontSize(typeVal QWebSettings__FontSize) {
C.QWebSettings_ResetFontSize(this.h, (C.int)(typeVal))
}
func (this *QWebSettings) SetAttribute(attr QWebSettings__WebAttribute, on bool) {
C.QWebSettings_SetAttribute(this.h, (C.int)(attr), (C.bool)(on))
}
func (this *QWebSettings) TestAttribute(attr QWebSettings__WebAttribute) bool {
return (bool)(C.QWebSettings_TestAttribute(this.h, (C.int)(attr)))
}
func (this *QWebSettings) ResetAttribute(attr QWebSettings__WebAttribute) {
C.QWebSettings_ResetAttribute(this.h, (C.int)(attr))
}
func (this *QWebSettings) SetUserStyleSheetUrl(location *qt.QUrl) {
C.QWebSettings_SetUserStyleSheetUrl(this.h, (*C.QUrl)(location.UnsafePointer()))
}
func (this *QWebSettings) UserStyleSheetUrl() *qt.QUrl {
_ret := C.QWebSettings_UserStyleSheetUrl(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 *QWebSettings) 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.QWebSettings_SetDefaultTextEncoding(this.h, encoding_ms)
}
func (this *QWebSettings) DefaultTextEncoding() string {
var _ms C.struct_miqt_string = C.QWebSettings_DefaultTextEncoding(this.h)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QWebSettings_SetIconDatabasePath(location string) {
location_ms := C.struct_miqt_string{}
location_ms.data = C.CString(location)
location_ms.len = C.size_t(len(location))
defer C.free(unsafe.Pointer(location_ms.data))
C.QWebSettings_SetIconDatabasePath(location_ms)
}
func QWebSettings_IconDatabasePath() string {
var _ms C.struct_miqt_string = C.QWebSettings_IconDatabasePath()
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QWebSettings_ClearIconDatabase() {
C.QWebSettings_ClearIconDatabase()
}
func QWebSettings_IconForUrl(url *qt.QUrl) *qt.QIcon {
_ret := C.QWebSettings_IconForUrl((*C.QUrl)(url.UnsafePointer()))
_goptr := qt.UnsafeNewQIcon(unsafe.Pointer(_ret))
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func QWebSettings_SetPluginSearchPaths(paths []string) {
paths_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(paths))))
defer C.free(unsafe.Pointer(paths_CArray))
for i := range paths {
paths_i_ms := C.struct_miqt_string{}
paths_i_ms.data = C.CString(paths[i])
paths_i_ms.len = C.size_t(len(paths[i]))
defer C.free(unsafe.Pointer(paths_i_ms.data))
paths_CArray[i] = paths_i_ms
}
paths_ma := C.struct_miqt_array{len: C.size_t(len(paths)), data: unsafe.Pointer(paths_CArray)}
C.QWebSettings_SetPluginSearchPaths(paths_ma)
}
func QWebSettings_PluginSearchPaths() []string {
var _ma C.struct_miqt_array = C.QWebSettings_PluginSearchPaths()
_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 QWebSettings_SetWebGraphic(typeVal QWebSettings__WebGraphic, graphic *qt.QPixmap) {
C.QWebSettings_SetWebGraphic((C.int)(typeVal), (*C.QPixmap)(graphic.UnsafePointer()))
}
func QWebSettings_WebGraphic(typeVal QWebSettings__WebGraphic) *qt.QPixmap {
_ret := C.QWebSettings_WebGraphic((C.int)(typeVal))
_goptr := qt.UnsafeNewQPixmap(unsafe.Pointer(_ret), nil)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func QWebSettings_SetMaximumPagesInCache(pages int) {
C.QWebSettings_SetMaximumPagesInCache((C.int)(pages))
}
func QWebSettings_MaximumPagesInCache() int {
return (int)(C.QWebSettings_MaximumPagesInCache())
}
func QWebSettings_SetObjectCacheCapacities(cacheMinDeadCapacity int, cacheMaxDead int, totalCapacity int) {
C.QWebSettings_SetObjectCacheCapacities((C.int)(cacheMinDeadCapacity), (C.int)(cacheMaxDead), (C.int)(totalCapacity))
}
func QWebSettings_SetOfflineStoragePath(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.QWebSettings_SetOfflineStoragePath(path_ms)
}
func QWebSettings_OfflineStoragePath() string {
var _ms C.struct_miqt_string = C.QWebSettings_OfflineStoragePath()
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QWebSettings_SetOfflineStorageDefaultQuota(maximumSize int64) {
C.QWebSettings_SetOfflineStorageDefaultQuota((C.longlong)(maximumSize))
}
func QWebSettings_OfflineStorageDefaultQuota() int64 {
return (int64)(C.QWebSettings_OfflineStorageDefaultQuota())
}
func QWebSettings_SetOfflineWebApplicationCachePath(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.QWebSettings_SetOfflineWebApplicationCachePath(path_ms)
}
func QWebSettings_OfflineWebApplicationCachePath() string {
var _ms C.struct_miqt_string = C.QWebSettings_OfflineWebApplicationCachePath()
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QWebSettings_SetOfflineWebApplicationCacheQuota(maximumSize int64) {
C.QWebSettings_SetOfflineWebApplicationCacheQuota((C.longlong)(maximumSize))
}
func QWebSettings_OfflineWebApplicationCacheQuota() int64 {
return (int64)(C.QWebSettings_OfflineWebApplicationCacheQuota())
}
func (this *QWebSettings) SetLocalStoragePath(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.QWebSettings_SetLocalStoragePath(this.h, path_ms)
}
func (this *QWebSettings) LocalStoragePath() string {
var _ms C.struct_miqt_string = C.QWebSettings_LocalStoragePath(this.h)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QWebSettings_ClearMemoryCaches() {
C.QWebSettings_ClearMemoryCaches()
}
func QWebSettings_EnablePersistentStorage() {
C.QWebSettings_EnablePersistentStorage()
}
func (this *QWebSettings) SetThirdPartyCookiePolicy(thirdPartyCookiePolicy QWebSettings__ThirdPartyCookiePolicy) {
C.QWebSettings_SetThirdPartyCookiePolicy(this.h, (C.int)(thirdPartyCookiePolicy))
}
func (this *QWebSettings) ThirdPartyCookiePolicy() QWebSettings__ThirdPartyCookiePolicy {
return (QWebSettings__ThirdPartyCookiePolicy)(C.QWebSettings_ThirdPartyCookiePolicy(this.h))
}
func (this *QWebSettings) SetCSSMediaType(cSSMediaType string) {
cSSMediaType_ms := C.struct_miqt_string{}
cSSMediaType_ms.data = C.CString(cSSMediaType)
cSSMediaType_ms.len = C.size_t(len(cSSMediaType))
defer C.free(unsafe.Pointer(cSSMediaType_ms.data))
C.QWebSettings_SetCSSMediaType(this.h, cSSMediaType_ms)
}
func (this *QWebSettings) CssMediaType() string {
var _ms C.struct_miqt_string = C.QWebSettings_CssMediaType(this.h)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QWebSettings_EnablePersistentStorage1(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.QWebSettings_EnablePersistentStorage1(path_ms)
}

View File

@ -0,0 +1,76 @@
#pragma once
#ifndef MIQT_QT_WEBKIT_GEN_QWEBSETTINGS_H
#define MIQT_QT_WEBKIT_GEN_QWEBSETTINGS_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 QIcon;
class QPixmap;
class QUrl;
class QWebSettings;
#else
typedef struct QIcon QIcon;
typedef struct QPixmap QPixmap;
typedef struct QUrl QUrl;
typedef struct QWebSettings QWebSettings;
#endif
QWebSettings* QWebSettings_GlobalSettings();
void QWebSettings_SetFontFamily(QWebSettings* self, int which, struct miqt_string family);
struct miqt_string QWebSettings_FontFamily(const QWebSettings* self, int which);
void QWebSettings_ResetFontFamily(QWebSettings* self, int which);
void QWebSettings_SetFontSize(QWebSettings* self, int typeVal, int size);
int QWebSettings_FontSize(const QWebSettings* self, int typeVal);
void QWebSettings_ResetFontSize(QWebSettings* self, int typeVal);
void QWebSettings_SetAttribute(QWebSettings* self, int attr, bool on);
bool QWebSettings_TestAttribute(const QWebSettings* self, int attr);
void QWebSettings_ResetAttribute(QWebSettings* self, int attr);
void QWebSettings_SetUserStyleSheetUrl(QWebSettings* self, QUrl* location);
QUrl* QWebSettings_UserStyleSheetUrl(const QWebSettings* self);
void QWebSettings_SetDefaultTextEncoding(QWebSettings* self, struct miqt_string encoding);
struct miqt_string QWebSettings_DefaultTextEncoding(const QWebSettings* self);
void QWebSettings_SetIconDatabasePath(struct miqt_string location);
struct miqt_string QWebSettings_IconDatabasePath();
void QWebSettings_ClearIconDatabase();
QIcon* QWebSettings_IconForUrl(QUrl* url);
void QWebSettings_SetPluginSearchPaths(struct miqt_array /* of struct miqt_string */ paths);
struct miqt_array /* of struct miqt_string */ QWebSettings_PluginSearchPaths();
void QWebSettings_SetWebGraphic(int typeVal, QPixmap* graphic);
QPixmap* QWebSettings_WebGraphic(int typeVal);
void QWebSettings_SetMaximumPagesInCache(int pages);
int QWebSettings_MaximumPagesInCache();
void QWebSettings_SetObjectCacheCapacities(int cacheMinDeadCapacity, int cacheMaxDead, int totalCapacity);
void QWebSettings_SetOfflineStoragePath(struct miqt_string path);
struct miqt_string QWebSettings_OfflineStoragePath();
void QWebSettings_SetOfflineStorageDefaultQuota(long long maximumSize);
long long QWebSettings_OfflineStorageDefaultQuota();
void QWebSettings_SetOfflineWebApplicationCachePath(struct miqt_string path);
struct miqt_string QWebSettings_OfflineWebApplicationCachePath();
void QWebSettings_SetOfflineWebApplicationCacheQuota(long long maximumSize);
long long QWebSettings_OfflineWebApplicationCacheQuota();
void QWebSettings_SetLocalStoragePath(QWebSettings* self, struct miqt_string path);
struct miqt_string QWebSettings_LocalStoragePath(const QWebSettings* self);
void QWebSettings_ClearMemoryCaches();
void QWebSettings_EnablePersistentStorage();
void QWebSettings_SetThirdPartyCookiePolicy(QWebSettings* self, int thirdPartyCookiePolicy);
int QWebSettings_ThirdPartyCookiePolicy(const QWebSettings* self);
void QWebSettings_SetCSSMediaType(QWebSettings* self, struct miqt_string cSSMediaType);
struct miqt_string QWebSettings_CssMediaType(const QWebSettings* self);
void QWebSettings_EnablePersistentStorage1(struct miqt_string path);
#ifdef __cplusplus
} /* extern C */
#endif
#endif

1806
qt/webkit/gen_qwebview.cpp Normal file

File diff suppressed because it is too large Load Diff

1569
qt/webkit/gen_qwebview.go Normal file

File diff suppressed because it is too large Load Diff

275
qt/webkit/gen_qwebview.h Normal file
View File

@ -0,0 +1,275 @@
#pragma once
#ifndef MIQT_QT_WEBKIT_GEN_QWEBVIEW_H
#define MIQT_QT_WEBKIT_GEN_QWEBVIEW_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 QNetworkRequest;
class QObject;
class QPaintDevice;
class QPaintEngine;
class QPaintEvent;
class QPainter;
class QPoint;
class QPrinter;
class QResizeEvent;
class QShowEvent;
class QSize;
class QTabletEvent;
class QUrl;
class QVariant;
class QWebHistory;
class QWebPage;
class QWebSettings;
class QWebView;
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 QNetworkRequest QNetworkRequest;
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 QPrinter QPrinter;
typedef struct QResizeEvent QResizeEvent;
typedef struct QShowEvent QShowEvent;
typedef struct QSize QSize;
typedef struct QTabletEvent QTabletEvent;
typedef struct QUrl QUrl;
typedef struct QVariant QVariant;
typedef struct QWebHistory QWebHistory;
typedef struct QWebPage QWebPage;
typedef struct QWebSettings QWebSettings;
typedef struct QWebView QWebView;
typedef struct QWheelEvent QWheelEvent;
typedef struct QWidget QWidget;
#endif
void QWebView_new(QWidget* parent, QWebView** outptr_QWebView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice);
void QWebView_new2(QWebView** outptr_QWebView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice);
QMetaObject* QWebView_MetaObject(const QWebView* self);
void* QWebView_Metacast(QWebView* self, const char* param1);
struct miqt_string QWebView_Tr(const char* s);
struct miqt_string QWebView_TrUtf8(const char* s);
QWebPage* QWebView_Page(const QWebView* self);
void QWebView_SetPage(QWebView* self, QWebPage* page);
void QWebView_Load(QWebView* self, QUrl* url);
void QWebView_LoadWithRequest(QWebView* self, QNetworkRequest* request);
void QWebView_SetHtml(QWebView* self, struct miqt_string html);
void QWebView_SetContent(QWebView* self, struct miqt_string data);
QWebHistory* QWebView_History(const QWebView* self);
QWebSettings* QWebView_Settings(const QWebView* self);
struct miqt_string QWebView_Title(const QWebView* self);
void QWebView_SetUrl(QWebView* self, QUrl* url);
QUrl* QWebView_Url(const QWebView* self);
QIcon* QWebView_Icon(const QWebView* self);
bool QWebView_HasSelection(const QWebView* self);
struct miqt_string QWebView_SelectedText(const QWebView* self);
struct miqt_string QWebView_SelectedHtml(const QWebView* self);
QAction* QWebView_PageAction(const QWebView* self, int action);
void QWebView_TriggerPageAction(QWebView* self, int action);
bool QWebView_IsModified(const QWebView* self);
QVariant* QWebView_InputMethodQuery(const QWebView* self, int property);
QSize* QWebView_SizeHint(const QWebView* self);
double QWebView_ZoomFactor(const QWebView* self);
void QWebView_SetZoomFactor(QWebView* self, double factor);
void QWebView_SetTextSizeMultiplier(QWebView* self, double factor);
double QWebView_TextSizeMultiplier(const QWebView* self);
int QWebView_RenderHints(const QWebView* self);
void QWebView_SetRenderHints(QWebView* self, int hints);
void QWebView_SetRenderHint(QWebView* self, int hint);
bool QWebView_FindText(QWebView* self, struct miqt_string subString);
bool QWebView_Event(QWebView* self, QEvent* param1);
void QWebView_Stop(QWebView* self);
void QWebView_Back(QWebView* self);
void QWebView_Forward(QWebView* self);
void QWebView_Reload(QWebView* self);
void QWebView_Print(const QWebView* self, QPrinter* param1);
void QWebView_LoadStarted(QWebView* self);
void QWebView_connect_LoadStarted(QWebView* self, intptr_t slot);
void QWebView_LoadProgress(QWebView* self, int progress);
void QWebView_connect_LoadProgress(QWebView* self, intptr_t slot);
void QWebView_LoadFinished(QWebView* self, bool param1);
void QWebView_connect_LoadFinished(QWebView* self, intptr_t slot);
void QWebView_TitleChanged(QWebView* self, struct miqt_string title);
void QWebView_connect_TitleChanged(QWebView* self, intptr_t slot);
void QWebView_StatusBarMessage(QWebView* self, struct miqt_string text);
void QWebView_connect_StatusBarMessage(QWebView* self, intptr_t slot);
void QWebView_LinkClicked(QWebView* self, QUrl* param1);
void QWebView_connect_LinkClicked(QWebView* self, intptr_t slot);
void QWebView_SelectionChanged(QWebView* self);
void QWebView_connect_SelectionChanged(QWebView* self, intptr_t slot);
void QWebView_IconChanged(QWebView* self);
void QWebView_connect_IconChanged(QWebView* self, intptr_t slot);
void QWebView_UrlChanged(QWebView* self, QUrl* param1);
void QWebView_connect_UrlChanged(QWebView* self, intptr_t slot);
void QWebView_ResizeEvent(QWebView* self, QResizeEvent* param1);
void QWebView_PaintEvent(QWebView* self, QPaintEvent* param1);
QWebView* QWebView_CreateWindow(QWebView* self, int typeVal);
void QWebView_ChangeEvent(QWebView* self, QEvent* param1);
void QWebView_MouseMoveEvent(QWebView* self, QMouseEvent* param1);
void QWebView_MousePressEvent(QWebView* self, QMouseEvent* param1);
void QWebView_MouseDoubleClickEvent(QWebView* self, QMouseEvent* param1);
void QWebView_MouseReleaseEvent(QWebView* self, QMouseEvent* param1);
void QWebView_ContextMenuEvent(QWebView* self, QContextMenuEvent* param1);
void QWebView_WheelEvent(QWebView* self, QWheelEvent* param1);
void QWebView_KeyPressEvent(QWebView* self, QKeyEvent* param1);
void QWebView_KeyReleaseEvent(QWebView* self, QKeyEvent* param1);
void QWebView_DragEnterEvent(QWebView* self, QDragEnterEvent* param1);
void QWebView_DragLeaveEvent(QWebView* self, QDragLeaveEvent* param1);
void QWebView_DragMoveEvent(QWebView* self, QDragMoveEvent* param1);
void QWebView_DropEvent(QWebView* self, QDropEvent* param1);
void QWebView_FocusInEvent(QWebView* self, QFocusEvent* param1);
void QWebView_FocusOutEvent(QWebView* self, QFocusEvent* param1);
void QWebView_InputMethodEvent(QWebView* self, QInputMethodEvent* param1);
bool QWebView_FocusNextPrevChild(QWebView* self, bool next);
struct miqt_string QWebView_Tr2(const char* s, const char* c);
struct miqt_string QWebView_Tr3(const char* s, const char* c, int n);
struct miqt_string QWebView_TrUtf82(const char* s, const char* c);
struct miqt_string QWebView_TrUtf83(const char* s, const char* c, int n);
void QWebView_Load2(QWebView* self, QNetworkRequest* request, int operation);
void QWebView_Load3(QWebView* self, QNetworkRequest* request, int operation, struct miqt_string body);
void QWebView_SetHtml2(QWebView* self, struct miqt_string html, QUrl* baseUrl);
void QWebView_SetContent2(QWebView* self, struct miqt_string data, struct miqt_string mimeType);
void QWebView_SetContent3(QWebView* self, struct miqt_string data, struct miqt_string mimeType, QUrl* baseUrl);
void QWebView_TriggerPageAction2(QWebView* self, int action, bool checked);
void QWebView_SetRenderHint2(QWebView* self, int hint, bool enabled);
bool QWebView_FindText2(QWebView* self, struct miqt_string subString, int options);
void QWebView_override_virtual_InputMethodQuery(void* self, intptr_t slot);
QVariant* QWebView_virtualbase_InputMethodQuery(const void* self, int property);
void QWebView_override_virtual_SizeHint(void* self, intptr_t slot);
QSize* QWebView_virtualbase_SizeHint(const void* self);
void QWebView_override_virtual_Event(void* self, intptr_t slot);
bool QWebView_virtualbase_Event(void* self, QEvent* param1);
void QWebView_override_virtual_ResizeEvent(void* self, intptr_t slot);
void QWebView_virtualbase_ResizeEvent(void* self, QResizeEvent* param1);
void QWebView_override_virtual_PaintEvent(void* self, intptr_t slot);
void QWebView_virtualbase_PaintEvent(void* self, QPaintEvent* param1);
void QWebView_override_virtual_CreateWindow(void* self, intptr_t slot);
QWebView* QWebView_virtualbase_CreateWindow(void* self, int typeVal);
void QWebView_override_virtual_ChangeEvent(void* self, intptr_t slot);
void QWebView_virtualbase_ChangeEvent(void* self, QEvent* param1);
void QWebView_override_virtual_MouseMoveEvent(void* self, intptr_t slot);
void QWebView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1);
void QWebView_override_virtual_MousePressEvent(void* self, intptr_t slot);
void QWebView_virtualbase_MousePressEvent(void* self, QMouseEvent* param1);
void QWebView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot);
void QWebView_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* param1);
void QWebView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot);
void QWebView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1);
void QWebView_override_virtual_ContextMenuEvent(void* self, intptr_t slot);
void QWebView_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1);
void QWebView_override_virtual_WheelEvent(void* self, intptr_t slot);
void QWebView_virtualbase_WheelEvent(void* self, QWheelEvent* param1);
void QWebView_override_virtual_KeyPressEvent(void* self, intptr_t slot);
void QWebView_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1);
void QWebView_override_virtual_KeyReleaseEvent(void* self, intptr_t slot);
void QWebView_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* param1);
void QWebView_override_virtual_DragEnterEvent(void* self, intptr_t slot);
void QWebView_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* param1);
void QWebView_override_virtual_DragLeaveEvent(void* self, intptr_t slot);
void QWebView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* param1);
void QWebView_override_virtual_DragMoveEvent(void* self, intptr_t slot);
void QWebView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* param1);
void QWebView_override_virtual_DropEvent(void* self, intptr_t slot);
void QWebView_virtualbase_DropEvent(void* self, QDropEvent* param1);
void QWebView_override_virtual_FocusInEvent(void* self, intptr_t slot);
void QWebView_virtualbase_FocusInEvent(void* self, QFocusEvent* param1);
void QWebView_override_virtual_FocusOutEvent(void* self, intptr_t slot);
void QWebView_virtualbase_FocusOutEvent(void* self, QFocusEvent* param1);
void QWebView_override_virtual_InputMethodEvent(void* self, intptr_t slot);
void QWebView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1);
void QWebView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot);
bool QWebView_virtualbase_FocusNextPrevChild(void* self, bool next);
void QWebView_override_virtual_DevType(void* self, intptr_t slot);
int QWebView_virtualbase_DevType(const void* self);
void QWebView_override_virtual_SetVisible(void* self, intptr_t slot);
void QWebView_virtualbase_SetVisible(void* self, bool visible);
void QWebView_override_virtual_MinimumSizeHint(void* self, intptr_t slot);
QSize* QWebView_virtualbase_MinimumSizeHint(const void* self);
void QWebView_override_virtual_HeightForWidth(void* self, intptr_t slot);
int QWebView_virtualbase_HeightForWidth(const void* self, int param1);
void QWebView_override_virtual_HasHeightForWidth(void* self, intptr_t slot);
bool QWebView_virtualbase_HasHeightForWidth(const void* self);
void QWebView_override_virtual_PaintEngine(void* self, intptr_t slot);
QPaintEngine* QWebView_virtualbase_PaintEngine(const void* self);
void QWebView_override_virtual_EnterEvent(void* self, intptr_t slot);
void QWebView_virtualbase_EnterEvent(void* self, QEvent* event);
void QWebView_override_virtual_LeaveEvent(void* self, intptr_t slot);
void QWebView_virtualbase_LeaveEvent(void* self, QEvent* event);
void QWebView_override_virtual_MoveEvent(void* self, intptr_t slot);
void QWebView_virtualbase_MoveEvent(void* self, QMoveEvent* event);
void QWebView_override_virtual_CloseEvent(void* self, intptr_t slot);
void QWebView_virtualbase_CloseEvent(void* self, QCloseEvent* event);
void QWebView_override_virtual_TabletEvent(void* self, intptr_t slot);
void QWebView_virtualbase_TabletEvent(void* self, QTabletEvent* event);
void QWebView_override_virtual_ActionEvent(void* self, intptr_t slot);
void QWebView_virtualbase_ActionEvent(void* self, QActionEvent* event);
void QWebView_override_virtual_ShowEvent(void* self, intptr_t slot);
void QWebView_virtualbase_ShowEvent(void* self, QShowEvent* event);
void QWebView_override_virtual_HideEvent(void* self, intptr_t slot);
void QWebView_virtualbase_HideEvent(void* self, QHideEvent* event);
void QWebView_override_virtual_NativeEvent(void* self, intptr_t slot);
bool QWebView_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result);
void QWebView_override_virtual_Metric(void* self, intptr_t slot);
int QWebView_virtualbase_Metric(const void* self, int param1);
void QWebView_override_virtual_InitPainter(void* self, intptr_t slot);
void QWebView_virtualbase_InitPainter(const void* self, QPainter* painter);
void QWebView_override_virtual_Redirected(void* self, intptr_t slot);
QPaintDevice* QWebView_virtualbase_Redirected(const void* self, QPoint* offset);
void QWebView_override_virtual_SharedPainter(void* self, intptr_t slot);
QPainter* QWebView_virtualbase_SharedPainter(const void* self);
void QWebView_Delete(QWebView* self, bool isSubclass);
#ifdef __cplusplus
} /* extern C */
#endif
#endif