// Package gio was automatically generated by github.com/bnema/puregotk DO NOT EDIT package gio import ( "structs" "unsafe" "github.com/ebitengine/purego" "github.com/bnema/puregotk/pkg/core" "github.com/bnema/puregotk/v4/gobject" "github.com/bnema/puregotk/v4/gobject/types" ) type FilterOutputStreamClass struct { _ structs.HostLayout ParentClass OutputStreamClass xGReserved1 uintptr xGReserved2 uintptr xGReserved3 uintptr } func (x *FilterOutputStreamClass) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } // OverrideGReserved1 sets the "_g_reserved1" callback function. func (x *FilterOutputStreamClass) OverrideGReserved1(cb func()) { if cb == nil { x.xGReserved1 = 0 } else { x.xGReserved1 = purego.NewCallback(func() { cb() }) } } // GetGReserved1 gets the "_g_reserved1" callback function. func (x *FilterOutputStreamClass) GetGReserved1() func() { if x.xGReserved1 == 0 { return nil } var rawCallback func() purego.RegisterFunc(&rawCallback, x.xGReserved1) return func() { rawCallback() } } // OverrideGReserved2 sets the "_g_reserved2" callback function. func (x *FilterOutputStreamClass) OverrideGReserved2(cb func()) { if cb == nil { x.xGReserved2 = 0 } else { x.xGReserved2 = purego.NewCallback(func() { cb() }) } } // GetGReserved2 gets the "_g_reserved2" callback function. func (x *FilterOutputStreamClass) GetGReserved2() func() { if x.xGReserved2 == 0 { return nil } var rawCallback func() purego.RegisterFunc(&rawCallback, x.xGReserved2) return func() { rawCallback() } } // OverrideGReserved3 sets the "_g_reserved3" callback function. func (x *FilterOutputStreamClass) OverrideGReserved3(cb func()) { if cb == nil { x.xGReserved3 = 0 } else { x.xGReserved3 = purego.NewCallback(func() { cb() }) } } // GetGReserved3 gets the "_g_reserved3" callback function. func (x *FilterOutputStreamClass) GetGReserved3() func() { if x.xGReserved3 == 0 { return nil } var rawCallback func() purego.RegisterFunc(&rawCallback, x.xGReserved3) return func() { rawCallback() } } // Base class for output stream implementations that perform some // kind of filtering operation on a base stream. Typical examples // of filtering operations are character set conversion, compression // and byte order flipping. type FilterOutputStream struct { OutputStream } var xFilterOutputStreamGLibType func() types.GType func FilterOutputStreamGLibType() types.GType { return xFilterOutputStreamGLibType() } func FilterOutputStreamNewFromInternalPtr(ptr uintptr) *FilterOutputStream { cls := &FilterOutputStream{} cls.Ptr = ptr return cls } var xFilterOutputStreamGetBaseStream func(uintptr) uintptr // Gets the base stream for the filter stream. func (x *FilterOutputStream) GetBaseStream() *OutputStream { var cls *OutputStream cret := xFilterOutputStreamGetBaseStream(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &OutputStream{} cls.Ptr = cret return cls } var xFilterOutputStreamGetCloseBaseStream func(uintptr) bool // Returns whether the base stream will be closed when @stream is // closed. func (x *FilterOutputStream) GetCloseBaseStream() bool { cret := xFilterOutputStreamGetCloseBaseStream(x.GoPointer()) return cret } var xFilterOutputStreamSetCloseBaseStream func(uintptr, bool) // Sets whether the base stream will be closed when @stream is closed. func (x *FilterOutputStream) SetCloseBaseStream(CloseBaseVar bool) { xFilterOutputStreamSetCloseBaseStream(x.GoPointer(), CloseBaseVar) } func (c *FilterOutputStream) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *FilterOutputStream) SetGoPointer(ptr uintptr) { c.Ptr = ptr } // SetPropertyCloseBaseStream sets the "close-base-stream" property. // Whether the base stream should be closed when the filter stream is closed. func (x *FilterOutputStream) SetPropertyCloseBaseStream(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("close-base-stream", &v) } // GetPropertyCloseBaseStream gets the "close-base-stream" property. // Whether the base stream should be closed when the filter stream is closed. func (x *FilterOutputStream) GetPropertyCloseBaseStream() bool { var v gobject.Value x.GetProperty("close-base-stream", &v) return v.GetBoolean() } func init() { core.SetPackageName("GIO", "gio-2.0") core.SetSharedLibraries("GIO", []string{"libgio-2.0.so.0"}) var libs []uintptr for _, libPath := range core.GetPaths("GIO") { lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) if err != nil { panic(err) } libs = append(libs, lib) } core.PuregoSafeRegister(&xFilterOutputStreamGLibType, libs, "g_filter_output_stream_get_type") core.PuregoSafeRegister(&xFilterOutputStreamGetBaseStream, libs, "g_filter_output_stream_get_base_stream") core.PuregoSafeRegister(&xFilterOutputStreamGetCloseBaseStream, libs, "g_filter_output_stream_get_close_base_stream") core.PuregoSafeRegister(&xFilterOutputStreamSetCloseBaseStream, libs, "g_filter_output_stream_set_close_base_stream") }