Thanks to visit codestin.com
Credit goes to docs.rs

Skip to main content

Crate systemicons

Crate systemicons 

Source
Expand description

§systemicons

With this lib you can retrieve the system icon which is associated to a certain file extension. The icon will be in the .png format. Windows and Linux (GTK) are supported.

When you specify an absolute path to a .exe file, then the icon is loaded from resource, if the exe contains an icon resource.

Structs§

Error
Possible Error

Enums§

InnerError
Inner Error type of possible Error

Functions§

get_icon
Retrieving system icon. You have to specify the file extension and desired icon size (like 16, 32 or 64). Returns the icon formatted as png as byte buffer.
get_icon_as_file
Retrieving system icon. You have to specify the file extension and desired icon size (like 16, 32 or 64). Returns the path to the system icon.
init
In a non GTK program you have to initialize GTK when getting system icons (Linux)-