miqt/qt6/webengine/gen_qwebenginecontextmenurequest.go

242 lines
9.8 KiB
Go
Raw Normal View History

2024-11-27 05:16:48 +00:00
package webengine
/*
#include "gen_qwebenginecontextmenurequest.h"
#include <stdlib.h>
*/
import "C"
import (
"github.com/mappu/miqt/qt6"
"runtime"
"unsafe"
)
type QtWebEngineCore__ReferrerPolicy int
const (
QtWebEngineCore__Always QtWebEngineCore__ReferrerPolicy = 0
QtWebEngineCore__Default QtWebEngineCore__ReferrerPolicy = 1
QtWebEngineCore__NoReferrerWhenDowngrade QtWebEngineCore__ReferrerPolicy = 2
QtWebEngineCore__Never QtWebEngineCore__ReferrerPolicy = 3
QtWebEngineCore__Origin QtWebEngineCore__ReferrerPolicy = 4
QtWebEngineCore__OriginWhenCrossOrigin QtWebEngineCore__ReferrerPolicy = 5
QtWebEngineCore__NoReferrerWhenDowngradeOriginWhenCrossOrigin QtWebEngineCore__ReferrerPolicy = 6
QtWebEngineCore__SameOrigin QtWebEngineCore__ReferrerPolicy = 7
QtWebEngineCore__StrictOrigin QtWebEngineCore__ReferrerPolicy = 8
QtWebEngineCore__Last QtWebEngineCore__ReferrerPolicy = 8
)
type QWebEngineContextMenuRequest__MediaType int
const (
QWebEngineContextMenuRequest__MediaTypeNone QWebEngineContextMenuRequest__MediaType = 0
QWebEngineContextMenuRequest__MediaTypeImage QWebEngineContextMenuRequest__MediaType = 1
QWebEngineContextMenuRequest__MediaTypeVideo QWebEngineContextMenuRequest__MediaType = 2
QWebEngineContextMenuRequest__MediaTypeAudio QWebEngineContextMenuRequest__MediaType = 3
QWebEngineContextMenuRequest__MediaTypeCanvas QWebEngineContextMenuRequest__MediaType = 4
QWebEngineContextMenuRequest__MediaTypeFile QWebEngineContextMenuRequest__MediaType = 5
QWebEngineContextMenuRequest__MediaTypePlugin QWebEngineContextMenuRequest__MediaType = 6
)
type QWebEngineContextMenuRequest__MediaFlag int
const (
QWebEngineContextMenuRequest__MediaInError QWebEngineContextMenuRequest__MediaFlag = 1
QWebEngineContextMenuRequest__MediaPaused QWebEngineContextMenuRequest__MediaFlag = 2
QWebEngineContextMenuRequest__MediaMuted QWebEngineContextMenuRequest__MediaFlag = 4
QWebEngineContextMenuRequest__MediaLoop QWebEngineContextMenuRequest__MediaFlag = 8
QWebEngineContextMenuRequest__MediaCanSave QWebEngineContextMenuRequest__MediaFlag = 16
QWebEngineContextMenuRequest__MediaHasAudio QWebEngineContextMenuRequest__MediaFlag = 32
QWebEngineContextMenuRequest__MediaCanToggleControls QWebEngineContextMenuRequest__MediaFlag = 64
QWebEngineContextMenuRequest__MediaControls QWebEngineContextMenuRequest__MediaFlag = 128
QWebEngineContextMenuRequest__MediaCanPrint QWebEngineContextMenuRequest__MediaFlag = 256
QWebEngineContextMenuRequest__MediaCanRotate QWebEngineContextMenuRequest__MediaFlag = 512
)
type QWebEngineContextMenuRequest__EditFlag int
const (
QWebEngineContextMenuRequest__CanUndo QWebEngineContextMenuRequest__EditFlag = 1
QWebEngineContextMenuRequest__CanRedo QWebEngineContextMenuRequest__EditFlag = 2
QWebEngineContextMenuRequest__CanCut QWebEngineContextMenuRequest__EditFlag = 4
QWebEngineContextMenuRequest__CanCopy QWebEngineContextMenuRequest__EditFlag = 8
QWebEngineContextMenuRequest__CanPaste QWebEngineContextMenuRequest__EditFlag = 16
QWebEngineContextMenuRequest__CanDelete QWebEngineContextMenuRequest__EditFlag = 32
QWebEngineContextMenuRequest__CanSelectAll QWebEngineContextMenuRequest__EditFlag = 64
QWebEngineContextMenuRequest__CanTranslate QWebEngineContextMenuRequest__EditFlag = 128
QWebEngineContextMenuRequest__CanEditRichly QWebEngineContextMenuRequest__EditFlag = 256
)
type QWebEngineContextMenuRequest struct {
h *C.QWebEngineContextMenuRequest
isSubclass bool
*qt6.QObject
}
func (this *QWebEngineContextMenuRequest) cPointer() *C.QWebEngineContextMenuRequest {
if this == nil {
return nil
}
return this.h
}
func (this *QWebEngineContextMenuRequest) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
// newQWebEngineContextMenuRequest constructs the type using only CGO pointers.
func newQWebEngineContextMenuRequest(h *C.QWebEngineContextMenuRequest, h_QObject *C.QObject) *QWebEngineContextMenuRequest {
if h == nil {
return nil
}
return &QWebEngineContextMenuRequest{h: h,
QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))}
}
// UnsafeNewQWebEngineContextMenuRequest constructs the type using only unsafe pointers.
func UnsafeNewQWebEngineContextMenuRequest(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineContextMenuRequest {
if h == nil {
return nil
}
return &QWebEngineContextMenuRequest{h: (*C.QWebEngineContextMenuRequest)(h),
QObject: qt6.UnsafeNewQObject(h_QObject)}
}
func (this *QWebEngineContextMenuRequest) MetaObject() *qt6.QMetaObject {
return qt6.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebEngineContextMenuRequest_MetaObject(this.h)))
}
func (this *QWebEngineContextMenuRequest) Metacast(param1 string) unsafe.Pointer {
param1_Cstring := C.CString(param1)
defer C.free(unsafe.Pointer(param1_Cstring))
return (unsafe.Pointer)(C.QWebEngineContextMenuRequest_Metacast(this.h, param1_Cstring))
}
func QWebEngineContextMenuRequest_Tr(s string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
var _ms C.struct_miqt_string = C.QWebEngineContextMenuRequest_Tr(s_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QWebEngineContextMenuRequest) Position() *qt6.QPoint {
_goptr := qt6.UnsafeNewQPoint(unsafe.Pointer(C.QWebEngineContextMenuRequest_Position(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 *QWebEngineContextMenuRequest) SelectedText() string {
var _ms C.struct_miqt_string = C.QWebEngineContextMenuRequest_SelectedText(this.h)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QWebEngineContextMenuRequest) LinkText() string {
var _ms C.struct_miqt_string = C.QWebEngineContextMenuRequest_LinkText(this.h)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QWebEngineContextMenuRequest) LinkUrl() *qt6.QUrl {
_goptr := qt6.UnsafeNewQUrl(unsafe.Pointer(C.QWebEngineContextMenuRequest_LinkUrl(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 *QWebEngineContextMenuRequest) MediaUrl() *qt6.QUrl {
_goptr := qt6.UnsafeNewQUrl(unsafe.Pointer(C.QWebEngineContextMenuRequest_MediaUrl(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 *QWebEngineContextMenuRequest) MediaType() QWebEngineContextMenuRequest__MediaType {
return (QWebEngineContextMenuRequest__MediaType)(C.QWebEngineContextMenuRequest_MediaType(this.h))
}
func (this *QWebEngineContextMenuRequest) IsContentEditable() bool {
return (bool)(C.QWebEngineContextMenuRequest_IsContentEditable(this.h))
}
func (this *QWebEngineContextMenuRequest) MisspelledWord() string {
var _ms C.struct_miqt_string = C.QWebEngineContextMenuRequest_MisspelledWord(this.h)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QWebEngineContextMenuRequest) SpellCheckerSuggestions() []string {
var _ma C.struct_miqt_array = C.QWebEngineContextMenuRequest_SpellCheckerSuggestions(this.h)
_ret := make([]string, int(_ma.len))
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
for i := 0; i < int(_ma.len); i++ {
var _lv_ms C.struct_miqt_string = _outCast[i]
_lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len)))
C.free(unsafe.Pointer(_lv_ms.data))
_ret[i] = _lv_ret
}
return _ret
}
func (this *QWebEngineContextMenuRequest) IsAccepted() bool {
return (bool)(C.QWebEngineContextMenuRequest_IsAccepted(this.h))
}
func (this *QWebEngineContextMenuRequest) SetAccepted(accepted bool) {
C.QWebEngineContextMenuRequest_SetAccepted(this.h, (C.bool)(accepted))
}
func (this *QWebEngineContextMenuRequest) MediaFlags() QWebEngineContextMenuRequest__MediaFlag {
return (QWebEngineContextMenuRequest__MediaFlag)(C.QWebEngineContextMenuRequest_MediaFlags(this.h))
}
func (this *QWebEngineContextMenuRequest) EditFlags() QWebEngineContextMenuRequest__EditFlag {
return (QWebEngineContextMenuRequest__EditFlag)(C.QWebEngineContextMenuRequest_EditFlags(this.h))
}
func QWebEngineContextMenuRequest_Tr2(s string, c string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
c_Cstring := C.CString(c)
defer C.free(unsafe.Pointer(c_Cstring))
var _ms C.struct_miqt_string = C.QWebEngineContextMenuRequest_Tr2(s_Cstring, c_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QWebEngineContextMenuRequest_Tr3(s string, c string, n int) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
c_Cstring := C.CString(c)
defer C.free(unsafe.Pointer(c_Cstring))
var _ms C.struct_miqt_string = C.QWebEngineContextMenuRequest_Tr3(s_Cstring, c_Cstring, (C.int)(n))
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
// Delete this object from C++ memory.
func (this *QWebEngineContextMenuRequest) Delete() {
C.QWebEngineContextMenuRequest_Delete(this.h, C.bool(this.isSubclass))
}
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
// from C++ memory once it is unreachable from Go memory.
func (this *QWebEngineContextMenuRequest) GoGC() {
runtime.SetFinalizer(this, func(this *QWebEngineContextMenuRequest) {
this.Delete()
runtime.KeepAlive(this.h)
})
}