type Gtk_Icon_Source is new Glib.C_Boxed with null record;
Null_Gtk_Icon_Source : constant Gtk_Icon_Source;
function From_Object
( | Object | : System.Address) return Gtk_Icon_Source; |
function From_Object_Free
( | B | : access Gtk_Icon_Source'Class) return Gtk_Icon_Source; |
procedure Gtk_New
( | Self | : out Gtk_Icon_Source); |
function Gtk_Icon_Source_New return Gtk_Icon_Source;
function Get_Type return Glib.GType;
function Copy
( | Self | : Gtk_Icon_Source) return Gtk_Icon_Source; |
procedure Free
( | Self | : Gtk_Icon_Source); |
function Get_Direction
( | Self | : Gtk_Icon_Source) return Gtk.Enums.Gtk_Text_Direction; |
procedure Set_Direction
( | Self | : Gtk_Icon_Source; |
Direction | : Gtk.Enums.Gtk_Text_Direction); |
function Get_Direction_Wildcarded
( | Self | : Gtk_Icon_Source) return Boolean; |
procedure Set_Direction_Wildcarded
( | Self | : Gtk_Icon_Source; |
Setting | : Boolean); |
function Get_Filename
( | Self | : Gtk_Icon_Source) return UTF8_String; |
procedure Set_Filename
( | Self | : Gtk_Icon_Source; |
Filename | : UTF8_String); |
function Get_Icon_Name
( | Self | : Gtk_Icon_Source) return UTF8_String; |
procedure Set_Icon_Name
( | Self | : Gtk_Icon_Source; |
Icon_Name | : UTF8_String := ""); |
function Get_Pixbuf
( | Self | : Gtk_Icon_Source) return Gdk.Pixbuf.Gdk_Pixbuf; |
procedure Set_Pixbuf
( | Self | : Gtk_Icon_Source; |
Pixbuf | : not null access Gdk.Pixbuf.Gdk_Pixbuf_Record'Class); |
function Get_Size
( | Self | : Gtk_Icon_Source) return Gtk.Enums.Gtk_Icon_Size; |
procedure Set_Size
( | Self | : Gtk_Icon_Source; |
Size | : Gtk.Enums.Gtk_Icon_Size); |
function Get_Size_Wildcarded
( | Self | : Gtk_Icon_Source) return Boolean; |
procedure Set_Size_Wildcarded
( | Self | : Gtk_Icon_Source; |
Setting | : Boolean); |
function Get_State
( | Self | : Gtk_Icon_Source) return Gtk.Enums.Gtk_State_Type; |
procedure Set_State
( | Self | : Gtk_Icon_Source; |
State | : Gtk.Enums.Gtk_State_Type); |
function Get_State_Wildcarded
( | Self | : Gtk_Icon_Source) return Boolean; |
procedure Set_State_Wildcarded
( | Self | : Gtk_Icon_Source; |
Setting | : Boolean); |
An icon source contains a Gdk_Pixbuf (or image filename) that serves as the base image for one or more of the icons in an icon set, along with a specification for which icons in the icon set will be based on that pixbuf or image file. An icon set contains a set of icons that represent "the same" logical concept in different states, different global text directions, and different sizes.
So for example a web browser's "Back to Previous Page" icon might point in a different direction in Hebrew and in English; it might look different when insensitive; and it might change size depending on toolbar mode (small/large icons). So a single icon set would contain all those variants of the icon. An icon set contains a list of icon sources from which it can derive specific icon variants in the set.
In the simplest case, an icon set contains one source pixbuf from which it derives all variants.
If you want to use a different base pixbuf for different icon variants, you create multiple icon sources, mark which variants they'll be used to create, and add them to the icon set with Add_Source (see below).
By default, the icon source has all parameters wildcarded. That is, the icon source will be used as the base icon for any desired text direction, widget state, or icon size.