// Package glib was automatically generated by github.com/bnema/puregotk DO NOT EDIT package glib import ( "github.com/ebitengine/purego" "github.com/bnema/puregotk/pkg/core" ) var xHostnameIsAsciiEncoded func(string) bool // Tests if @hostname contains segments with an ASCII-compatible // encoding of an Internationalized Domain Name. If this returns // %TRUE, you should decode the hostname with g_hostname_to_unicode() // before displaying it to the user. // // Note that a hostname might contain a mix of encoded and unencoded // segments, and so it is possible for g_hostname_is_non_ascii() and // g_hostname_is_ascii_encoded() to both return %TRUE for a name. func HostnameIsAsciiEncoded(HostnameVar string) bool { cret := xHostnameIsAsciiEncoded(HostnameVar) return cret } var xHostnameIsIpAddress func(string) bool // Tests if @hostname is the string form of an IPv4 or IPv6 address. // (Eg, "192.168.0.1".) // // Since 2.66, IPv6 addresses with a zone-id are accepted (RFC6874). func HostnameIsIpAddress(HostnameVar string) bool { cret := xHostnameIsIpAddress(HostnameVar) return cret } var xHostnameIsNonAscii func(string) bool // Tests if @hostname contains Unicode characters. If this returns // %TRUE, you need to encode the hostname with g_hostname_to_ascii() // before using it in non-IDN-aware contexts. // // Note that a hostname might contain a mix of encoded and unencoded // segments, and so it is possible for g_hostname_is_non_ascii() and // g_hostname_is_ascii_encoded() to both return %TRUE for a name. func HostnameIsNonAscii(HostnameVar string) bool { cret := xHostnameIsNonAscii(HostnameVar) return cret } var xHostnameToAscii func(string) string // Converts @hostname to its canonical ASCII form; an ASCII-only // string containing no uppercase letters and not ending with a // trailing dot. func HostnameToAscii(HostnameVar string) string { cret := xHostnameToAscii(HostnameVar) return cret } var xHostnameToUnicode func(string) string // Converts @hostname to its canonical presentation form; a UTF-8 // string in Unicode normalization form C, containing no uppercase // letters, no forbidden characters, and no ASCII-encoded segments, // and not ending with a trailing dot. // // Of course if @hostname is not an internationalized hostname, then // the canonical presentation form will be entirely ASCII. func HostnameToUnicode(HostnameVar string) string { cret := xHostnameToUnicode(HostnameVar) return cret } func init() { core.SetPackageName("GLIB", "glib-2.0") core.SetSharedLibraries("GLIB", []string{"libgobject-2.0.so.0", "libglib-2.0.so.0"}) var libs []uintptr for _, libPath := range core.GetPaths("GLIB") { lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) if err != nil { panic(err) } libs = append(libs, lib) } core.PuregoSafeRegister(&xHostnameIsAsciiEncoded, libs, "g_hostname_is_ascii_encoded") core.PuregoSafeRegister(&xHostnameIsIpAddress, libs, "g_hostname_is_ip_address") core.PuregoSafeRegister(&xHostnameIsNonAscii, libs, "g_hostname_is_non_ascii") core.PuregoSafeRegister(&xHostnameToAscii, libs, "g_hostname_to_ascii") core.PuregoSafeRegister(&xHostnameToUnicode, libs, "g_hostname_to_unicode") }