// 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 TcpWrapperConnectionClass struct { _ structs.HostLayout ParentClass TcpConnectionClass } func (x *TcpWrapperConnectionClass) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } type TcpWrapperConnectionPrivate struct { _ structs.HostLayout } func (x *TcpWrapperConnectionPrivate) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } // A `GTcpWrapperConnection` can be used to wrap a [class@Gio.IOStream] that is // based on a [class@Gio.Socket], but which is not actually a // [class@Gio.SocketConnection]. This is used by [class@Gio.SocketClient] so // that it can always return a [class@Gio.SocketConnection], even when the // connection it has actually created is not directly a // [class@Gio.SocketConnection]. type TcpWrapperConnection struct { TcpConnection } var xTcpWrapperConnectionGLibType func() types.GType func TcpWrapperConnectionGLibType() types.GType { return xTcpWrapperConnectionGLibType() } func TcpWrapperConnectionNewFromInternalPtr(ptr uintptr) *TcpWrapperConnection { cls := &TcpWrapperConnection{} cls.Ptr = ptr return cls } var xNewTcpWrapperConnection func(uintptr, uintptr) uintptr // Wraps @base_io_stream and @socket together as a #GSocketConnection. func NewTcpWrapperConnection(BaseIoStreamVar *IOStream, SocketVar *Socket) *TcpWrapperConnection { var cls *TcpWrapperConnection cret := xNewTcpWrapperConnection(BaseIoStreamVar.GoPointer(), SocketVar.GoPointer()) if cret == 0 { return nil } cls = &TcpWrapperConnection{} cls.Ptr = cret return cls } var xTcpWrapperConnectionGetBaseIoStream func(uintptr) uintptr // Gets @conn's base #GIOStream func (x *TcpWrapperConnection) GetBaseIoStream() *IOStream { var cls *IOStream cret := xTcpWrapperConnectionGetBaseIoStream(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &IOStream{} cls.Ptr = cret return cls } func (c *TcpWrapperConnection) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *TcpWrapperConnection) 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(&xTcpWrapperConnectionGLibType, libs, "g_tcp_wrapper_connection_get_type") core.PuregoSafeRegister(&xNewTcpWrapperConnection, libs, "g_tcp_wrapper_connection_new") core.PuregoSafeRegister(&xTcpWrapperConnectionGetBaseIoStream, libs, "g_tcp_wrapper_connection_get_base_io_stream") }