Gtk.IconTheme.prototype.choose_icon

function choose_icon(icon_names:[String], size:Number, flags:Gtk.IconLookupFlags):Gtk.IconInfo {
    // Gjs wrapper for gtk_icon_theme_choose_icon()
}

Looks up a named icon and returns a structure containing information such as the filename of the icon. The icon can then be rendered into a pixbuf using Gtk.IconInfo.prototype.load_icon. (Gtk.load_icon combines these two steps if all you need is the pixbuf.)

If icon_names contains more than one name, this function tries them all in the given order before falling back to inherited icon themes.

Since 2.12

icon_names

null-terminated array of icon names to lookup

size

desired icon size

flags

flags modifying the behavior of the icon lookup

Returns

a Gtk.IconInfo object containing information about the icon, or null if the icon wasn't found.