lookupThemeIcons

Iterate over all icons in icon themes. iconThemes is usually the range of the main theme and themes it inherits from. Note: Usually if some icon was found in icon theme, it should be ignored in all subsequent themes, including sizes not presented in former theme. Use subdirFilter to filter icons by icontheme.file.IconSubDir thus decreasing the number of searchable items and allocations.

lookupThemeIcons
(
alias subdirFilter = (a => true)
IconThemes
BaseDirs
Exts
)
(
IconThemes iconThemes
,,)
if (
is(ElementType!IconThemes : const(IconThemeFile)) &&
is(ElementType!BaseDirs : string)
&&
is(ElementType!Exts : string)
)

Parameters

iconThemes IconThemes

icon themes to search icon in.

searchIconDirs BaseDirs

base icon directories.

extensions Exts

possible file extensions for icon files.

Return Value

Type: auto

Examples

foreach(item; lookupThemeIcons!(subdir => subdir.context == "MimeTypes" && subdir.size >= 32)(iconThemes, baseIconDirs(), [".png", ".xpm"]))
{
    writefln("Icon file: %s. Context: %s. Size: %s", item.filePath, item.subdir.context, item.subdir.size);
}

See Also

icontheme.paths.baseIconDirs, lookupIcon, openBaseThemes

Meta