miqt/qt/gen_qpixelformat.go

263 lines
8.8 KiB
Go
Raw Normal View History

package qt
/*
#include "gen_qpixelformat.h"
#include <stdlib.h>
*/
import "C"
import (
"runtime"
"unsafe"
)
2024-09-04 06:54:22 +00:00
type QPixelFormat__ColorModel int
const (
2024-09-20 07:13:26 +00:00
QPixelFormat__RGB QPixelFormat__ColorModel = 0
QPixelFormat__BGR QPixelFormat__ColorModel = 1
QPixelFormat__Indexed QPixelFormat__ColorModel = 2
QPixelFormat__Grayscale QPixelFormat__ColorModel = 3
QPixelFormat__CMYK QPixelFormat__ColorModel = 4
QPixelFormat__HSL QPixelFormat__ColorModel = 5
QPixelFormat__HSV QPixelFormat__ColorModel = 6
QPixelFormat__YUV QPixelFormat__ColorModel = 7
QPixelFormat__Alpha QPixelFormat__ColorModel = 8
2024-09-04 06:54:22 +00:00
)
type QPixelFormat__AlphaUsage int
const (
2024-09-20 07:13:26 +00:00
QPixelFormat__UsesAlpha QPixelFormat__AlphaUsage = 0
QPixelFormat__IgnoresAlpha QPixelFormat__AlphaUsage = 1
2024-09-04 06:54:22 +00:00
)
type QPixelFormat__AlphaPosition int
const (
2024-09-20 07:13:26 +00:00
QPixelFormat__AtBeginning QPixelFormat__AlphaPosition = 0
QPixelFormat__AtEnd QPixelFormat__AlphaPosition = 1
2024-09-04 06:54:22 +00:00
)
type QPixelFormat__AlphaPremultiplied int
const (
2024-09-20 07:13:26 +00:00
QPixelFormat__NotPremultiplied QPixelFormat__AlphaPremultiplied = 0
QPixelFormat__Premultiplied QPixelFormat__AlphaPremultiplied = 1
2024-09-04 06:54:22 +00:00
)
type QPixelFormat__TypeInterpretation int
const (
2024-09-20 07:13:26 +00:00
QPixelFormat__UnsignedInteger QPixelFormat__TypeInterpretation = 0
QPixelFormat__UnsignedShort QPixelFormat__TypeInterpretation = 1
QPixelFormat__UnsignedByte QPixelFormat__TypeInterpretation = 2
QPixelFormat__FloatingPoint QPixelFormat__TypeInterpretation = 3
2024-09-04 06:54:22 +00:00
)
type QPixelFormat__YUVLayout int
const (
2024-09-20 07:13:26 +00:00
QPixelFormat__YUV444 QPixelFormat__YUVLayout = 0
QPixelFormat__YUV422 QPixelFormat__YUVLayout = 1
QPixelFormat__YUV411 QPixelFormat__YUVLayout = 2
QPixelFormat__YUV420P QPixelFormat__YUVLayout = 3
QPixelFormat__YUV420SP QPixelFormat__YUVLayout = 4
QPixelFormat__YV12 QPixelFormat__YUVLayout = 5
QPixelFormat__UYVY QPixelFormat__YUVLayout = 6
QPixelFormat__YUYV QPixelFormat__YUVLayout = 7
QPixelFormat__NV12 QPixelFormat__YUVLayout = 8
QPixelFormat__NV21 QPixelFormat__YUVLayout = 9
QPixelFormat__IMC1 QPixelFormat__YUVLayout = 10
QPixelFormat__IMC2 QPixelFormat__YUVLayout = 11
QPixelFormat__IMC3 QPixelFormat__YUVLayout = 12
QPixelFormat__IMC4 QPixelFormat__YUVLayout = 13
QPixelFormat__Y8 QPixelFormat__YUVLayout = 14
QPixelFormat__Y16 QPixelFormat__YUVLayout = 15
2024-09-04 06:54:22 +00:00
)
type QPixelFormat__ByteOrder int
const (
2024-09-20 07:13:26 +00:00
QPixelFormat__LittleEndian QPixelFormat__ByteOrder = 0
QPixelFormat__BigEndian QPixelFormat__ByteOrder = 1
QPixelFormat__CurrentSystemEndian QPixelFormat__ByteOrder = 2
2024-09-04 06:54:22 +00:00
)
type QPixelFormat struct {
2024-11-19 06:29:06 +00:00
h *C.QPixelFormat
isSubclass bool
}
func (this *QPixelFormat) cPointer() *C.QPixelFormat {
if this == nil {
return nil
}
return this.h
}
func (this *QPixelFormat) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 06:29:06 +00:00
// newQPixelFormat constructs the type using only CGO pointers.
func newQPixelFormat(h *C.QPixelFormat) *QPixelFormat {
2024-09-01 02:23:55 +00:00
if h == nil {
return nil
}
2024-12-07 04:15:57 +00:00
return &QPixelFormat{h: h}
}
2024-11-19 06:29:06 +00:00
// UnsafeNewQPixelFormat constructs the type using only unsafe pointers.
func UnsafeNewQPixelFormat(h unsafe.Pointer) *QPixelFormat {
2024-12-07 04:15:57 +00:00
return newQPixelFormat((*C.QPixelFormat)(h))
}
// NewQPixelFormat constructs a new QPixelFormat object.
func NewQPixelFormat() *QPixelFormat {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQPixelFormat(C.QPixelFormat_new())
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
}
// NewQPixelFormat2 constructs a new QPixelFormat object.
2024-09-04 06:54:22 +00:00
func NewQPixelFormat2(colorModel QPixelFormat__ColorModel, firstSize byte, secondSize byte, thirdSize byte, fourthSize byte, fifthSize byte, alphaSize byte, alphaUsage QPixelFormat__AlphaUsage, alphaPosition QPixelFormat__AlphaPosition, premultiplied QPixelFormat__AlphaPremultiplied, typeInterpretation QPixelFormat__TypeInterpretation) *QPixelFormat {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQPixelFormat(C.QPixelFormat_new2((C.int)(colorModel), (C.uchar)(firstSize), (C.uchar)(secondSize), (C.uchar)(thirdSize), (C.uchar)(fourthSize), (C.uchar)(fifthSize), (C.uchar)(alphaSize), (C.int)(alphaUsage), (C.int)(alphaPosition), (C.int)(premultiplied), (C.int)(typeInterpretation)))
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
}
2024-08-29 07:01:51 +00:00
// NewQPixelFormat3 constructs a new QPixelFormat object.
func NewQPixelFormat3(param1 *QPixelFormat) *QPixelFormat {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQPixelFormat(C.QPixelFormat_new3(param1.cPointer()))
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-08-29 07:01:51 +00:00
}
// NewQPixelFormat4 constructs a new QPixelFormat object.
2024-09-04 06:54:22 +00:00
func NewQPixelFormat4(colorModel QPixelFormat__ColorModel, firstSize byte, secondSize byte, thirdSize byte, fourthSize byte, fifthSize byte, alphaSize byte, alphaUsage QPixelFormat__AlphaUsage, alphaPosition QPixelFormat__AlphaPosition, premultiplied QPixelFormat__AlphaPremultiplied, typeInterpretation QPixelFormat__TypeInterpretation, byteOrder QPixelFormat__ByteOrder) *QPixelFormat {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQPixelFormat(C.QPixelFormat_new4((C.int)(colorModel), (C.uchar)(firstSize), (C.uchar)(secondSize), (C.uchar)(thirdSize), (C.uchar)(fourthSize), (C.uchar)(fifthSize), (C.uchar)(alphaSize), (C.int)(alphaUsage), (C.int)(alphaPosition), (C.int)(premultiplied), (C.int)(typeInterpretation), (C.int)(byteOrder)))
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-08-29 07:01:51 +00:00
}
// NewQPixelFormat5 constructs a new QPixelFormat object.
2024-09-04 06:54:22 +00:00
func NewQPixelFormat5(colorModel QPixelFormat__ColorModel, firstSize byte, secondSize byte, thirdSize byte, fourthSize byte, fifthSize byte, alphaSize byte, alphaUsage QPixelFormat__AlphaUsage, alphaPosition QPixelFormat__AlphaPosition, premultiplied QPixelFormat__AlphaPremultiplied, typeInterpretation QPixelFormat__TypeInterpretation, byteOrder QPixelFormat__ByteOrder, subEnum byte) *QPixelFormat {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQPixelFormat(C.QPixelFormat_new5((C.int)(colorModel), (C.uchar)(firstSize), (C.uchar)(secondSize), (C.uchar)(thirdSize), (C.uchar)(fourthSize), (C.uchar)(fifthSize), (C.uchar)(alphaSize), (C.int)(alphaUsage), (C.int)(alphaPosition), (C.int)(premultiplied), (C.int)(typeInterpretation), (C.int)(byteOrder), (C.uchar)(subEnum)))
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-08-29 07:01:51 +00:00
}
2024-09-04 06:54:22 +00:00
func (this *QPixelFormat) ColorModel() QPixelFormat__ColorModel {
return (QPixelFormat__ColorModel)(C.QPixelFormat_ColorModel(this.h))
2024-08-29 07:01:51 +00:00
}
func (this *QPixelFormat) ChannelCount() byte {
return (byte)(C.QPixelFormat_ChannelCount(this.h))
}
func (this *QPixelFormat) RedSize() byte {
return (byte)(C.QPixelFormat_RedSize(this.h))
}
func (this *QPixelFormat) GreenSize() byte {
return (byte)(C.QPixelFormat_GreenSize(this.h))
}
func (this *QPixelFormat) BlueSize() byte {
return (byte)(C.QPixelFormat_BlueSize(this.h))
}
func (this *QPixelFormat) CyanSize() byte {
return (byte)(C.QPixelFormat_CyanSize(this.h))
}
func (this *QPixelFormat) MagentaSize() byte {
return (byte)(C.QPixelFormat_MagentaSize(this.h))
}
func (this *QPixelFormat) YellowSize() byte {
return (byte)(C.QPixelFormat_YellowSize(this.h))
}
func (this *QPixelFormat) BlackSize() byte {
return (byte)(C.QPixelFormat_BlackSize(this.h))
}
func (this *QPixelFormat) HueSize() byte {
return (byte)(C.QPixelFormat_HueSize(this.h))
}
func (this *QPixelFormat) SaturationSize() byte {
return (byte)(C.QPixelFormat_SaturationSize(this.h))
}
func (this *QPixelFormat) LightnessSize() byte {
return (byte)(C.QPixelFormat_LightnessSize(this.h))
}
func (this *QPixelFormat) BrightnessSize() byte {
return (byte)(C.QPixelFormat_BrightnessSize(this.h))
}
func (this *QPixelFormat) AlphaSize() byte {
return (byte)(C.QPixelFormat_AlphaSize(this.h))
}
func (this *QPixelFormat) BitsPerPixel() byte {
return (byte)(C.QPixelFormat_BitsPerPixel(this.h))
}
2024-09-04 06:54:22 +00:00
func (this *QPixelFormat) AlphaUsage() QPixelFormat__AlphaUsage {
return (QPixelFormat__AlphaUsage)(C.QPixelFormat_AlphaUsage(this.h))
2024-08-29 07:01:51 +00:00
}
2024-09-04 06:54:22 +00:00
func (this *QPixelFormat) AlphaPosition() QPixelFormat__AlphaPosition {
return (QPixelFormat__AlphaPosition)(C.QPixelFormat_AlphaPosition(this.h))
2024-08-29 07:01:51 +00:00
}
2024-09-04 06:54:22 +00:00
func (this *QPixelFormat) Premultiplied() QPixelFormat__AlphaPremultiplied {
return (QPixelFormat__AlphaPremultiplied)(C.QPixelFormat_Premultiplied(this.h))
2024-08-29 07:01:51 +00:00
}
2024-09-04 06:54:22 +00:00
func (this *QPixelFormat) TypeInterpretation() QPixelFormat__TypeInterpretation {
return (QPixelFormat__TypeInterpretation)(C.QPixelFormat_TypeInterpretation(this.h))
2024-08-29 07:01:51 +00:00
}
2024-09-04 06:54:22 +00:00
func (this *QPixelFormat) ByteOrder() QPixelFormat__ByteOrder {
return (QPixelFormat__ByteOrder)(C.QPixelFormat_ByteOrder(this.h))
2024-08-29 07:01:51 +00:00
}
2024-09-04 06:54:22 +00:00
func (this *QPixelFormat) YuvLayout() QPixelFormat__YUVLayout {
return (QPixelFormat__YUVLayout)(C.QPixelFormat_YuvLayout(this.h))
2024-08-29 07:01:51 +00:00
}
func (this *QPixelFormat) SubEnum() byte {
return (byte)(C.QPixelFormat_SubEnum(this.h))
}
// Delete this object from C++ memory.
func (this *QPixelFormat) Delete() {
2024-11-19 06:29:06 +00:00
C.QPixelFormat_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 *QPixelFormat) GoGC() {
runtime.SetFinalizer(this, func(this *QPixelFormat) {
this.Delete()
runtime.KeepAlive(this.h)
})
}