2024-11-27 05:16:48 +00:00
|
|
|
package webengine
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qwebenginequotarequest.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/mappu/miqt/qt"
|
|
|
|
"runtime"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
|
|
|
type QWebEngineQuotaRequest struct {
|
|
|
|
h *C.QWebEngineQuotaRequest
|
|
|
|
isSubclass bool
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QWebEngineQuotaRequest) cPointer() *C.QWebEngineQuotaRequest {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QWebEngineQuotaRequest) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
// newQWebEngineQuotaRequest constructs the type using only CGO pointers.
|
|
|
|
func newQWebEngineQuotaRequest(h *C.QWebEngineQuotaRequest) *QWebEngineQuotaRequest {
|
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-12-07 04:15:57 +00:00
|
|
|
|
2024-11-27 05:16:48 +00:00
|
|
|
return &QWebEngineQuotaRequest{h: h}
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnsafeNewQWebEngineQuotaRequest constructs the type using only unsafe pointers.
|
|
|
|
func UnsafeNewQWebEngineQuotaRequest(h unsafe.Pointer) *QWebEngineQuotaRequest {
|
2024-12-07 04:15:57 +00:00
|
|
|
return newQWebEngineQuotaRequest((*C.QWebEngineQuotaRequest)(h))
|
2024-11-27 05:16:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQWebEngineQuotaRequest constructs a new QWebEngineQuotaRequest object.
|
|
|
|
func NewQWebEngineQuotaRequest() *QWebEngineQuotaRequest {
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
ret := newQWebEngineQuotaRequest(C.QWebEngineQuotaRequest_new())
|
2024-11-27 05:16:48 +00:00
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQWebEngineQuotaRequest2 constructs a new QWebEngineQuotaRequest object.
|
|
|
|
func NewQWebEngineQuotaRequest2(param1 *QWebEngineQuotaRequest) *QWebEngineQuotaRequest {
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
ret := newQWebEngineQuotaRequest(C.QWebEngineQuotaRequest_new2(param1.cPointer()))
|
2024-11-27 05:16:48 +00:00
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QWebEngineQuotaRequest) Accept() {
|
|
|
|
C.QWebEngineQuotaRequest_Accept(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QWebEngineQuotaRequest) Reject() {
|
|
|
|
C.QWebEngineQuotaRequest_Reject(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QWebEngineQuotaRequest) Origin() *qt.QUrl {
|
2024-12-07 02:02:06 +00:00
|
|
|
_goptr := qt.UnsafeNewQUrl(unsafe.Pointer(C.QWebEngineQuotaRequest_Origin(this.h)))
|
2024-11-27 05:16:48 +00:00
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QWebEngineQuotaRequest) RequestedSize() int64 {
|
|
|
|
return (int64)(C.QWebEngineQuotaRequest_RequestedSize(this.h))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QWebEngineQuotaRequest) OperatorEqual(that *QWebEngineQuotaRequest) bool {
|
|
|
|
return (bool)(C.QWebEngineQuotaRequest_OperatorEqual(this.h, that.cPointer()))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QWebEngineQuotaRequest) OperatorNotEqual(that *QWebEngineQuotaRequest) bool {
|
|
|
|
return (bool)(C.QWebEngineQuotaRequest_OperatorNotEqual(this.h, that.cPointer()))
|
|
|
|
}
|
|
|
|
|
|
|
|
// Delete this object from C++ memory.
|
|
|
|
func (this *QWebEngineQuotaRequest) Delete() {
|
|
|
|
C.QWebEngineQuotaRequest_Delete(this.h, C.bool(this.isSubclass))
|
|
|
|
}
|
|
|
|
|
|
|
|
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
|
|
|
|
// from C++ memory once it is unreachable from Go memory.
|
|
|
|
func (this *QWebEngineQuotaRequest) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QWebEngineQuotaRequest) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|