// 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/types" ) type NativeSocketAddressClass struct { _ structs.HostLayout ParentClass SocketAddressClass } func (x *NativeSocketAddressClass) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } type NativeSocketAddressPrivate struct { _ structs.HostLayout } func (x *NativeSocketAddressPrivate) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } // A socket address of some unknown native type. // // This corresponds to a general `struct sockaddr` of a type not otherwise // handled by GLib. type NativeSocketAddress struct { SocketAddress } var xNativeSocketAddressGLibType func() types.GType func NativeSocketAddressGLibType() types.GType { return xNativeSocketAddressGLibType() } func NativeSocketAddressNewFromInternalPtr(ptr uintptr) *NativeSocketAddress { cls := &NativeSocketAddress{} cls.Ptr = ptr return cls } var xNewNativeSocketAddress func(uintptr, uint) uintptr // Creates a new #GNativeSocketAddress for @native and @len. func NewNativeSocketAddress(NativeVar uintptr, LenVar uint) *NativeSocketAddress { var cls *NativeSocketAddress cret := xNewNativeSocketAddress(NativeVar, LenVar) if cret == 0 { return nil } cls = &NativeSocketAddress{} cls.Ptr = cret return cls } func (c *NativeSocketAddress) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *NativeSocketAddress) SetGoPointer(ptr uintptr) { c.Ptr = ptr } // Creates a #GSocketAddressEnumerator for @connectable. func (x *NativeSocketAddress) Enumerate() *SocketAddressEnumerator { var cls *SocketAddressEnumerator cret := XGSocketConnectableEnumerate(x.GoPointer()) if cret == 0 { return nil } cls = &SocketAddressEnumerator{} cls.Ptr = cret return cls } // Creates a #GSocketAddressEnumerator for @connectable that will // return a #GProxyAddress for each of its addresses that you must connect // to via a proxy. // // If @connectable does not implement // g_socket_connectable_proxy_enumerate(), this will fall back to // calling g_socket_connectable_enumerate(). func (x *NativeSocketAddress) ProxyEnumerate() *SocketAddressEnumerator { var cls *SocketAddressEnumerator cret := XGSocketConnectableProxyEnumerate(x.GoPointer()) if cret == 0 { return nil } cls = &SocketAddressEnumerator{} cls.Ptr = cret return cls } // Format a #GSocketConnectable as a string. This is a human-readable format for // use in debugging output, and is not a stable serialization format. It is not // suitable for use in user interfaces as it exposes too much information for a // user. // // If the #GSocketConnectable implementation does not support string formatting, // the implementation’s type name will be returned as a fallback. func (x *NativeSocketAddress) ToString() string { cret := XGSocketConnectableToString(x.GoPointer()) return cret } 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(&xNativeSocketAddressGLibType, libs, "g_native_socket_address_get_type") core.PuregoSafeRegister(&xNewNativeSocketAddress, libs, "g_native_socket_address_new") }