// 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/glib" "github.com/bnema/puregotk/v4/gobject" "github.com/bnema/puregotk/v4/gobject/types" ) type EmblemedIconClass struct { _ structs.HostLayout ParentClass gobject.ObjectClass } func (x *EmblemedIconClass) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } type EmblemedIconPrivate struct { _ structs.HostLayout } func (x *EmblemedIconPrivate) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } // `GEmblemedIcon` is an implementation of [iface@Gio.Icon] that supports // adding an emblem to an icon. Adding multiple emblems to an // icon is ensured via [method@Gio.EmblemedIcon.add_emblem]. // // Note that `GEmblemedIcon` allows no control over the position // of the emblems. See also [class@Gio.Emblem] for more information. type EmblemedIcon struct { gobject.Object } var xEmblemedIconGLibType func() types.GType func EmblemedIconGLibType() types.GType { return xEmblemedIconGLibType() } func EmblemedIconNewFromInternalPtr(ptr uintptr) *EmblemedIcon { cls := &EmblemedIcon{} cls.Ptr = ptr return cls } var xNewEmblemedIcon func(uintptr, uintptr) uintptr // Creates a new emblemed icon for @icon with the emblem @emblem. func NewEmblemedIcon(IconVar Icon, EmblemVar *Emblem) *EmblemedIcon { var cls *EmblemedIcon cret := xNewEmblemedIcon(IconVar.GoPointer(), EmblemVar.GoPointer()) if cret == 0 { return nil } cls = &EmblemedIcon{} cls.Ptr = cret return cls } var xEmblemedIconAddEmblem func(uintptr, uintptr) // Adds @emblem to the #GList of #GEmblems. func (x *EmblemedIcon) AddEmblem(EmblemVar *Emblem) { xEmblemedIconAddEmblem(x.GoPointer(), EmblemVar.GoPointer()) } var xEmblemedIconClearEmblems func(uintptr) // Removes all the emblems from @icon. func (x *EmblemedIcon) ClearEmblems() { xEmblemedIconClearEmblems(x.GoPointer()) } var xEmblemedIconGetEmblems func(uintptr) *glib.List // Gets the list of emblems for the @icon. func (x *EmblemedIcon) GetEmblems() *glib.List { cret := xEmblemedIconGetEmblems(x.GoPointer()) return cret } var xEmblemedIconGetIcon func(uintptr) uintptr // Gets the main icon for @emblemed. func (x *EmblemedIcon) GetIcon() *IconBase { var cls *IconBase cret := xEmblemedIconGetIcon(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &IconBase{} cls.Ptr = cret return cls } func (c *EmblemedIcon) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *EmblemedIcon) SetGoPointer(ptr uintptr) { c.Ptr = ptr } // Checks if two icons are equal. func (x *EmblemedIcon) Equal(Icon2Var Icon) bool { cret := XGIconEqual(x.GoPointer(), Icon2Var.GoPointer()) return cret } // Gets a hash for an icon. func (x *EmblemedIcon) Hash() uint { cret := XGIconHash(x.GoPointer()) return cret } // Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved // back by calling g_icon_deserialize() on the returned value. // As serialization will avoid using raw icon data when possible, it only // makes sense to transfer the #GVariant between processes on the same machine, // (as opposed to over the network), and within the same file system namespace. func (x *EmblemedIcon) Serialize() *glib.Variant { cret := XGIconSerialize(x.GoPointer()) return cret } // Generates a textual representation of @icon that can be used for // serialization such as when passing @icon to a different process or // saving it to persistent storage. Use g_icon_new_for_string() to // get @icon back from the returned string. // // The encoding of the returned string is proprietary to #GIcon except // in the following two cases // // - If @icon is a #GFileIcon, the returned string is a native path // (such as `/path/to/my icon.png`) without escaping // if the #GFile for @icon is a native file. If the file is not // native, the returned string is the result of g_file_get_uri() // (such as `sftp://path/to/my%20icon.png`). // // - If @icon is a #GThemedIcon with exactly one name and no fallbacks, // the encoding is simply the name (such as `network-server`). func (x *EmblemedIcon) ToString() string { cret := XGIconToString(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(&xEmblemedIconGLibType, libs, "g_emblemed_icon_get_type") core.PuregoSafeRegister(&xNewEmblemedIcon, libs, "g_emblemed_icon_new") core.PuregoSafeRegister(&xEmblemedIconAddEmblem, libs, "g_emblemed_icon_add_emblem") core.PuregoSafeRegister(&xEmblemedIconClearEmblems, libs, "g_emblemed_icon_clear_emblems") core.PuregoSafeRegister(&xEmblemedIconGetEmblems, libs, "g_emblemed_icon_get_emblems") core.PuregoSafeRegister(&xEmblemedIconGetIcon, libs, "g_emblemed_icon_get_icon") }