Icon name.
Icon themes to search icon in.
Case icon directories.
Possible file extensions of needed icon file, in order of preference.
Output range accepting IconSearchResults.
Iterate over icon theme sub-directories in reverse way. Usually directories with larger icon size are listed the last, so this parameter may speed up the search when looking for the largest icon. Note: Specification says that extension must be ".png", ".xpm" or ".svg", though SVG is not required to be supported. Some icon themes also contain .svgz images.
lookupIcon!(subdir => subdir.context == "Places" && subdir.size >= 32)( "folder", iconThemes, baseIconDirs(), [".png", ".xpm"], delegate void (IconSearchResult!IconThemeFile item) { writefln("Icon file: %s. Context: %s. Size: %s. Theme: %s", item.filePath, item.subdir.context, item.subdir.size, item.iconTheme.displayName); });
icontheme.paths.baseIconDirs, lookupNonThemedIcon
Lookup icon alternatives in icon themes. It uses icon theme cache wherever it's loaded. If searched icon is found in some icon theme all subsequent themes are ignored.
This function may require many stat calls, so beware. Use subdirFilter to filter icons by icontheme.file.IconSubDir properties (e.g. by size or context) to decrease the number of searchable items and allocations. Loading icontheme.cache.IconThemeCache may also descrease the number of stats.