rofi
1.5.4
|
Functions | |
void | rofi_icon_fetcher_init (void) |
void | rofi_icon_fetcher_destroy (void) |
uint32_t | rofi_icon_fetcher_query (const char *name, const int size) |
cairo_surface_t * | rofi_icon_fetcher_get (const uint32_t uid) |
Small helper of to fetch icons. This makes use of the 'view' threadpool.
void rofi_icon_fetcher_destroy | ( | void | ) |
Destroy and free the memory used by the icon fetcher.
Definition at line 119 of file rofi-icon-fetcher.c.
References IconFetcher::icon_cache, IconFetcher::icon_cache_uid, rofi_icon_fetcher_data, and IconFetcher::xdg_context.
Referenced by cleanup().
cairo_surface_t* rofi_icon_fetcher_get | ( | const uint32_t | uid | ) |
uid | The unique id representing the matching request. |
If the surface is used, the user should reference the surface.
Definition at line 216 of file rofi-icon-fetcher.c.
References IconFetcher::icon_cache_uid, rofi_icon_fetcher_data, and IconFetcherEntry::surface.
Referenced by dmenu_get_icon(), icon_draw(), and script_get_icon().
void rofi_icon_fetcher_init | ( | void | ) |
Initialize the icon fetcher.
Definition at line 99 of file rofi-icon-fetcher.c.
References config, IconFetcher::icon_cache, IconFetcher::icon_cache_uid, Settings::icon_theme, rofi_icon_fetch_entry_free(), rofi_icon_fetcher_data, and IconFetcher::xdg_context.
Referenced by main().
uint32_t rofi_icon_fetcher_query | ( | const char * | name, |
const int | size | ||
) |
name | The name of the icon to fetch. |
size | The size of the icon to fetch. |
Query the icon-theme for icon with name and size. The returned icon will be the best match for the requested size, it should still be resized to the actual size.
name can also be a full path, if prefixed with file://.
Definition at line 182 of file rofi-icon-fetcher.c.
References _thread_state::callback, IconFetcherEntry::entry, IconFetcher::icon_cache, IconFetcher::icon_cache_uid, IconFetcher::last_uid, IconFetcherNameEntry::name, rofi_icon_fetcher_data, rofi_icon_fetcher_worker(), IconFetcherEntry::size, IconFetcherNameEntry::sizes, IconFetcherEntry::state, IconFetcherEntry::surface, tpool, and IconFetcherEntry::uid.
Referenced by dmenu_get_icon(), icon_create(), and script_get_icon().