IconIF

Description GIcon 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. GIcon does not provide the actual pixmap for the icon as this is out of GIO's scope, however implementations of GIcon may contain the name of an icon (see GThemedIcon), or the path to an icon (see GLoadableIcon). To obtain a hash of a GIcon, see g_icon_hash(). To check if two GIcons are equal, see g_icon_equal(). For serializing a GIcon, use g_icon_to_string() and g_icon_new_for_string(). If your application or library provides one or more GIcon implementations you need to ensure that each GType is registered with the type system prior to calling g_icon_new_for_string().

Members

Functions

equal
int equal(GIcon* icon2)

Checks if two icons are equal.

getIconTStruct
GIcon* getIconTStruct()
Undocumented in source.
getStruct
void* getStruct()

the main Gtk struct as a void*

toString
string toString()

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, the encoding is simply the name (such as network-server). Virtual: to_tokens Since 2.20

Static functions

hash
uint hash(void* icon)

Gets a hash for an icon. Virtual: hash

Meta