Package: gio

Interface gio:icon

Superclasses

gobject:object, common-lisp:standard-object, common-lisp:t

Documented Subclasses

Direct Slots

None

Details

The g:icon interface is a very minimal interface for icons. It provides functions for checking the equality of two icons, hashing of icons and serializing an icon to and from strings.

The g:icon interface does not provide the actual pixmap for the icon as this is out of the scope of GIO, however implementations of the g:icon interface may contain the name of an icon, see the g:themed-icon class, or the path to an icon, see the g:loadable-icon class.

To obtain a hash of a g:icon object, see the g:icon-hash function. To check if two g:icon objects are equal, see the g:icon-equal function.

For serializing a g:icon object, use the g:icon-serialize and g:icon-deserialize functions.

If you want to consume the g:icon interface, for example, in a toolkit, you must be prepared to handle at least the three following cases: g:loadable-icon, g:themed-icon and g:emblemed-icon classes. It may also make sense to have fast-paths for other cases, like handling the gdk-pixbuf:pixbuf object directly, for example, but all compliant g:icon implementations outside of GIO must implement the g:loadable-icon class.

If your application or library provides one or more g:icon implementations you need to ensure that your new implementation also implements the g:loadable-icon class. Additionally, you must provide an implementation of the g:icon-serialize function that gives a result that is understood by the g:icon-deserialize function, yielding one of the built-in icon types.
 

Inherited Slot Access Functions

See also

2024-10-23