IconSize

Members

Static functions

fromName
GtkIconSize fromName(string name)

Looks up the icon size associated with @name.

getName
string getName(GtkIconSize size)

Gets the canonical name of the given icon size. The returned string is statically allocated and should not be freed.

lookup
bool lookup(GtkIconSize size, int width, int height)

Obtains the pixel size of a semantic icon size @size: #GTK_ICON_SIZE_MENU, #GTK_ICON_SIZE_BUTTON, etc. This function isn’t normally needed, gtk_icon_theme_load_icon() is the usual way to get an icon for rendering, then just look at the size of the rendered pixbuf. The rendered pixbuf may not even correspond to the width/height returned by gtk_icon_size_lookup(), because themes are free to render the pixbuf however they like, including changing the usual size.

lookupForSettings
bool lookupForSettings(Settings settings, GtkIconSize size, int width, int height)

Obtains the pixel size of a semantic icon size, possibly modified by user preferences for a particular #GtkSettings. Normally @size would be #GTK_ICON_SIZE_MENU, #GTK_ICON_SIZE_BUTTON, etc. This function isn’t normally needed, gtk_widget_render_icon_pixbuf() is the usual way to get an icon for rendering, then just look at the size of the rendered pixbuf. The rendered pixbuf may not even correspond to the width/height returned by gtk_icon_size_lookup(), because themes are free to render the pixbuf however they like, including changing the usual size.

register
GtkIconSize register(string name, int width, int height)

Registers a new icon size, along the same lines as #GTK_ICON_SIZE_MENU, etc. Returns the integer value for the size.

registerAlias
void registerAlias(string alias_, GtkIconSize target)

Registers @alias as another name for @target. So calling gtk_icon_size_from_name() with @alias as argument will return @target.

Meta