#include <XDGKit/XDGKit.h>
#include <iostream>
int main()
{
auto kit = XDGKit::Make();
kit->iconThemeManager().findIcon(
"firefox",
512,
2,
XDGIcon::PNG | XDGIcon::SVG | XDGIcon::XMP,
{""}
);
if (firefox)
{
std::cout
<<
"Icon: " << firefox->
name() <<
"\n"
std::cout <<
"PNG Path: " << firefox->
getPath(XDGIcon::PNG) <<
"\n";
std::cout <<
"SVG Path: " << firefox->
getPath(XDGIcon::SVG) <<
"\n";
std::cout <<
"XMP Path: " << firefox->
getPath(XDGIcon::XMP) <<
"\n";
return 0;
}
else
{
std::cout << "Could not find an icon named 'firefox'." << "\n";
return 1;
}
}
int32_t scale() const noexcept
Retrieves the scale factor of the icons.
Definition XDGIconDirectory.h:84
XDGIconTheme & theme() const noexcept
Retrieves the theme to which this directory belongs.
Definition XDGIconDirectory.h:138
int32_t size() const noexcept
Retrieves the nominal (unscaled) size of icons in the directory.
Definition XDGIconDirectory.h:63
Properties of an icon.
Definition XDGIcon.h:14
XDGIconDirectory & directory() const noexcept
Retrieves the directory to which this icon belongs.
Definition XDGIcon.h:67
const char * name() const noexcept
Retrieves the name of the icon.
Definition XDGIcon.h:48
std::filesystem::path getPath(Extension ext) const noexcept
Retrieves the absolute path of the icon for a specified file extension.
Definition XDGIcon.cpp:6
uint32_t extensions() const noexcept
Retrieves the bitset of file extensions found for this icon.
Definition XDGIcon.h:41
const std::string & name() const noexcept
Retrieves the theme's directory base name.
Definition XDGIconTheme.h:48
Namespace.
Definition XDGNamespace.h:8