Index

Package: G_Icon

Description

package Glib.G_Icon is

Glib.G_Icon.G_Icon 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.

Glib.G_Icon.G_Icon does not provide the actual pixmap for the icon as this is out of GIO's scope, however implementations of Glib.G_Icon.G_Icon may contain the name of an icon (see Gthemed.Icon.Gthemed_Icon), or the path to an icon (see Gloadable.Icon.Gloadable_Icon).

To obtain a hash of a Glib.G_Icon.G_Icon, see Glib.G_Icon.Hash.

To check if two GIcons are equal, see Glib.G_Icon.Equal.

For serializing a Glib.G_Icon.G_Icon, use Glib.G_Icon.To_String and Glib.G_Icon.New_For_String.

If your application or library provides one or more Glib.G_Icon.G_Icon implementations you need to ensure that each GType is registered with the type system prior to calling Glib.G_Icon.New_For_String.

Types

Constants & Global variables

Null_G_Icon (G_Icon)

Null_G_Icon : constant G_Icon;

Subprograms & Entries

Get_Type

function Get_Type return Glib.GType;

Equal

function Equal 
(Self: G_Icon;
Icon2: G_Icon) return Boolean;
Checks if two icons are equal. "icon2": pointer to the second Glib.G_Icon.G_Icon.

To_String

function To_String 
(Self: G_Icon) return UTF8_String;
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 Glib.G_Icon.New_For_String to get Icon back from the returned string. The encoding of the returned string is proprietary to Glib.G_Icon.G_Icon except in the following two cases * If Icon is a Gfile.Icon.Gfile_Icon, the returned string is a native path (such as '/path/to/my icon.png') without escaping if the Gfile.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 Gthemed.Icon.Gthemed_Icon with exactly one name, the encoding is simply the name (such as 'network-server'). Since: gtk+ 2.20

Hash

function Hash 
(Icon: G_Icon) return Guint;

New_For_String

function New_For_String 
(Str: UTF8_String) return G_Icon;
Generate a Glib.G_Icon.G_Icon instance from Str. This function can fail if Str is not valid - see Glib.G_Icon.To_String for discussion. If your application or library provides one or more Glib.G_Icon.G_Icon implementations you need to ensure that each GType is registered with the type system prior to calling Glib.G_Icon.New_For_String. Since: gtk+ 2.20 "str": A string obtained via Glib.G_Icon.To_String.

+

function "+" 
(W: G_Icon) return G_Icon;