// Package gio was automatically generated by github.com/bnema/puregotk DO NOT EDIT package gio import ( "github.com/ebitengine/purego" "github.com/bnema/puregotk/pkg/core" "github.com/bnema/puregotk/v4/gobject/types" ) // `GSimpleIOStream` creates a [class@Gio.IOStream] from an arbitrary // [class@Gio.InputStream] and [class@Gio.OutputStream]. This allows any pair of // input and output streams to be used with [class@Gio.IOStream] methods. // // This is useful when you obtained a [class@Gio.InputStream] and a // [class@Gio.OutputStream] by other means, for instance creating them with // platform specific methods as // [`g_unix_input_stream_new()`](../gio-unix/ctor.UnixInputStream.new.html) // (from `gio-unix-2.0.pc` / `GioUnix-2.0`), and you want to // take advantage of the methods provided by [class@Gio.IOStream]. type SimpleIOStream struct { IOStream } var xSimpleIOStreamGLibType func() types.GType func SimpleIOStreamGLibType() types.GType { return xSimpleIOStreamGLibType() } func SimpleIOStreamNewFromInternalPtr(ptr uintptr) *SimpleIOStream { cls := &SimpleIOStream{} cls.Ptr = ptr return cls } var xNewSimpleIOStream func(uintptr, uintptr) uintptr // Creates a new #GSimpleIOStream wrapping @input_stream and @output_stream. // See also #GIOStream. func NewSimpleIOStream(InputStreamVar *InputStream, OutputStreamVar *OutputStream) *SimpleIOStream { var cls *SimpleIOStream cret := xNewSimpleIOStream(InputStreamVar.GoPointer(), OutputStreamVar.GoPointer()) if cret == 0 { return nil } cls = &SimpleIOStream{} cls.Ptr = cret return cls } func (c *SimpleIOStream) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *SimpleIOStream) SetGoPointer(ptr uintptr) { c.Ptr = ptr } 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(&xSimpleIOStreamGLibType, libs, "g_simple_io_stream_get_type") core.PuregoSafeRegister(&xNewSimpleIOStream, libs, "g_simple_io_stream_new") }