Package: gio

Function g-icon-to-string

Lambda List

g-icon-to-string (icon)

Arguments

icon -- a g-icon object

Return Value

An UTF-8 string or nil if icon cannot be serialized.

Details

Generates a textual representation of the icon that can be used for serialization such as when passing the icon to a different process or saving it to persistent storage. Use the function g-icon-new-for-string to get the icon back from the returned string.

The encoding of the returned string is proprietary to a g-icon object except in the following two cases
  • If icon is a g-file-icon object, the returned string is a native path, such as /path/to/my icon.png, without escaping if the g-file object for icon is a native file. If the file is not native, the returned string is the result of the function g-file-get-uri, such as sftp://path/to/my%20icon.png.
  • If icon is a g-themed-icon object with exactly one name, the encoding is simply the name, such as network-server.
 

See also

2021-4-15