![]() |
![]() |
![]() |
GIO Reference Manual | ![]() |
---|---|---|---|---|
#include <gio.h> GThemedIcon; GIcon* g_themed_icon_new (const char *iconname); GIcon* g_themed_icon_new_from_names (char **iconnames, int len); GIcon* g_themed_icon_new_with_default_fallbacks (const char *iconname);
GThemedIcon is an implementation of GIcon that supports icon themes.
GThemedIcon contains a list of all of the icons present in an icon
theme, so that icons can be looked up quickly. GThemedIcon does
not provide actual pixmaps for icons, just the icon names.
Ideally something like gtk_icon_theme_choose_icon()
should be used to
resolve the list of names so that fallback icons work nicely with
themes that inherit other themes.
GIcon* g_themed_icon_new (const char *iconname);
Creates a new themed icon for iconname
.
|
a string containing an icon name. |
Returns : |
a new GThemedIcon. |
GIcon* g_themed_icon_new_from_names (char **iconnames, int len);
Creates a new themed icon for iconnames
.
|
an array of strings containing icon names. |
|
the number of elements in the iconnames array.
|
Returns : |
a new GThemedIcon. |
GIcon* g_themed_icon_new_with_default_fallbacks (const char *iconname);
Creates a new themed icon for iconname
, and all the names
that can be created by shortening iconname
at '-' characters.
In the following example, icon1
and icon2
are equivalent:
const char *names[] = { "gnome-dev-cdrom-audio", "gnome-dev-cdrom", "gnome-dev", "gnome" }; icon1 = g_themed_icon_new_from_names (names, 4); icon2 = g_themed_icon_new_with_default_fallbacks ("gnome-dev-cdrom-audio");
|
a string containing an icon name |
Returns : |
a new GThemedIcon. |