Enumeration

GtkIconSize

Declaration

enum Gtk.IconSize

Description [src]

Built-in stock icon sizes.

Members

GTK_ICON_SIZE_INVALID

Invalid size.

  • Value: 0
  • Available since: 3.0
GTK_ICON_SIZE_MENU

Size appropriate for menus (16px).

  • Value: 1
  • Available since: 3.0
GTK_ICON_SIZE_SMALL_TOOLBAR

Size appropriate for small toolbars (16px).

  • Value: 2
  • Available since: 3.0
GTK_ICON_SIZE_LARGE_TOOLBAR

Size appropriate for large toolbars (24px)

  • Value: 3
  • Available since: 3.0
GTK_ICON_SIZE_BUTTON

Size appropriate for buttons (16px)

  • Value: 4
  • Available since: 3.0
GTK_ICON_SIZE_DND

Size appropriate for drag and drop (32px)

  • Value: 5
  • Available since: 3.0
GTK_ICON_SIZE_DIALOG

Size appropriate for dialogs (48px)

  • Value: 6
  • Available since: 3.0

Type functions

gtk_icon_size_from_name

Looks up the icon size associated with name.

deprecated: 3.10 

gtk_icon_size_get_name

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

deprecated: 3.10 

gtk_icon_size_lookup

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.

gtk_icon_size_lookup_for_settings

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.

deprecated: 3.10 since: 2.2

gtk_icon_size_register

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

deprecated: 3.10 

gtk_icon_size_register_alias

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

deprecated: 3.10