Crate icon_cache

Source
Expand description

Complete and user-friendly zero-copy wrappers for the GTK icon cache which is present on most linux systems.

GTK’s icon cache maintains a hash-indexed map from icon names (e.g. open-menu) to a list of images representing that icon, each in a different directory, usually denoting that icon’s size, whether it’s scalable, etc.

This crate provides a safe wrapper around this cache and is designed for use with mmap. To get started, look at IconCache.

§Feature flags

  • file: Enables the file module to safely open and memory-map cache files. Enabled by default.

Modules§

file
Load icon caches from a file path in a safe manner
raw
FFI-compatible ‘raw’ structs matching the exact layout of the icon cache file.

Structs§

DirectoryList
List of directories in the icon theme with paths relative to the root of the icon theme.
Icon
An icon, identified by its name, and the list of images provided by the icon theme for this icon.
IconCache
Thin wrapper around an in-memory icon cache.
Image
ImageData
ImageList