miqt/qt/webengine/gen_qwebenginefullscreenrequest.go

87 lines
2.3 KiB
Go
Raw Permalink Normal View History

2024-11-27 05:16:48 +00:00
package webengine
/*
#include "gen_qwebenginefullscreenrequest.h"
#include <stdlib.h>
*/
import "C"
import (
"github.com/mappu/miqt/qt"
"runtime"
"unsafe"
)
type QWebEngineFullScreenRequest struct {
h *C.QWebEngineFullScreenRequest
isSubclass bool
}
func (this *QWebEngineFullScreenRequest) cPointer() *C.QWebEngineFullScreenRequest {
if this == nil {
return nil
}
return this.h
}
func (this *QWebEngineFullScreenRequest) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
// newQWebEngineFullScreenRequest constructs the type using only CGO pointers.
func newQWebEngineFullScreenRequest(h *C.QWebEngineFullScreenRequest) *QWebEngineFullScreenRequest {
if h == nil {
return nil
}
2024-12-07 04:15:57 +00:00
2024-11-27 05:16:48 +00:00
return &QWebEngineFullScreenRequest{h: h}
}
// UnsafeNewQWebEngineFullScreenRequest constructs the type using only unsafe pointers.
func UnsafeNewQWebEngineFullScreenRequest(h unsafe.Pointer) *QWebEngineFullScreenRequest {
2024-12-07 04:15:57 +00:00
return newQWebEngineFullScreenRequest((*C.QWebEngineFullScreenRequest)(h))
2024-11-27 05:16:48 +00:00
}
// NewQWebEngineFullScreenRequest constructs a new QWebEngineFullScreenRequest object.
func NewQWebEngineFullScreenRequest(param1 *QWebEngineFullScreenRequest) *QWebEngineFullScreenRequest {
2024-12-07 04:15:57 +00:00
ret := newQWebEngineFullScreenRequest(C.QWebEngineFullScreenRequest_new(param1.cPointer()))
2024-11-27 05:16:48 +00:00
ret.isSubclass = true
return ret
}
func (this *QWebEngineFullScreenRequest) Reject() {
C.QWebEngineFullScreenRequest_Reject(this.h)
}
func (this *QWebEngineFullScreenRequest) Accept() {
C.QWebEngineFullScreenRequest_Accept(this.h)
}
func (this *QWebEngineFullScreenRequest) ToggleOn() bool {
return (bool)(C.QWebEngineFullScreenRequest_ToggleOn(this.h))
}
func (this *QWebEngineFullScreenRequest) Origin() *qt.QUrl {
return qt.UnsafeNewQUrl(unsafe.Pointer(C.QWebEngineFullScreenRequest_Origin(this.h)))
}
// Delete this object from C++ memory.
func (this *QWebEngineFullScreenRequest) Delete() {
C.QWebEngineFullScreenRequest_Delete(this.h, C.bool(this.isSubclass))
}
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
// from C++ memory once it is unreachable from Go memory.
func (this *QWebEngineFullScreenRequest) GoGC() {
runtime.SetFinalizer(this, func(this *QWebEngineFullScreenRequest) {
this.Delete()
runtime.KeepAlive(this.h)
})
}