miqt/qt6/gen_qiodevicebase.go

62 lines
1.4 KiB
Go
Raw Normal View History

2024-10-20 05:21:03 +00:00
package qt6
/*
#include "gen_qiodevicebase.h"
#include <stdlib.h>
*/
import "C"
import (
"unsafe"
)
type QIODeviceBase__OpenModeFlag int
const (
QIODeviceBase__NotOpen QIODeviceBase__OpenModeFlag = 0
QIODeviceBase__ReadOnly QIODeviceBase__OpenModeFlag = 1
QIODeviceBase__WriteOnly QIODeviceBase__OpenModeFlag = 2
QIODeviceBase__ReadWrite QIODeviceBase__OpenModeFlag = 3
QIODeviceBase__Append QIODeviceBase__OpenModeFlag = 4
QIODeviceBase__Truncate QIODeviceBase__OpenModeFlag = 8
QIODeviceBase__Text QIODeviceBase__OpenModeFlag = 16
QIODeviceBase__Unbuffered QIODeviceBase__OpenModeFlag = 32
QIODeviceBase__NewOnly QIODeviceBase__OpenModeFlag = 64
QIODeviceBase__ExistingOnly QIODeviceBase__OpenModeFlag = 128
)
type QIODeviceBase struct {
2024-11-19 06:29:06 +00:00
h *C.QIODeviceBase
isSubclass bool
2024-10-20 05:21:03 +00:00
}
func (this *QIODeviceBase) cPointer() *C.QIODeviceBase {
if this == nil {
return nil
}
return this.h
}
func (this *QIODeviceBase) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 06:29:06 +00:00
// newQIODeviceBase constructs the type using only CGO pointers.
2024-10-20 05:21:03 +00:00
func newQIODeviceBase(h *C.QIODeviceBase) *QIODeviceBase {
if h == nil {
return nil
}
2024-12-07 04:15:57 +00:00
2024-10-20 05:21:03 +00:00
return &QIODeviceBase{h: h}
}
2024-11-19 06:29:06 +00:00
// UnsafeNewQIODeviceBase constructs the type using only unsafe pointers.
2024-10-20 05:21:03 +00:00
func UnsafeNewQIODeviceBase(h unsafe.Pointer) *QIODeviceBase {
2024-12-07 04:15:57 +00:00
return newQIODeviceBase((*C.QIODeviceBase)(h))
2024-10-20 05:21:03 +00:00
}