|
Dunst
Lightweight notification daemon
|
#include "icon-lookup.h"#include <glib.h>#include <stdio.h>#include <unistd.h>#include <assert.h>#include "ini.h"#include "utils.h"#include "log.h"
Include dependency graph for icon-lookup.c:Go to the source code of this file.
Functions | |
| int | get_icon_theme (char *name) |
| int | load_icon_theme_from_dir (const char *icon_dir, const char *subdir_theme) |
| Load a theme from a directory. | |
| void | get_theme_path (void) |
| int | load_icon_theme (char *name) |
| Load a theme with given name from a standard icon directory. | |
| void | finish_icon_theme_dir (struct icon_theme_dir *dir) |
| void | finish_icon_theme (struct icon_theme *theme) |
| void | free_all_themes (void) |
| Free all icon themes. | |
| void | add_default_theme (int theme_index) |
| Add theme to the list of default themes. | |
| char * | find_icon_in_theme (const char *name, int theme_index, int size) |
| Find icon of specified size in selected theme. | |
| char * | find_icon_in_theme_with_inherit (const char *name, int theme_index, int size) |
| char * | find_icon_path (const char *name, int size) |
| Find icon of specified size in the default theme or an inherited theme. | |
Variables | |
| struct icon_theme * | icon_themes = NULL |
| int | icon_themes_count = 0 |
| int * | default_themes_index = NULL |
| int | default_themes_count = 0 |
| GPtrArray * | theme_path = NULL |
Definition in file icon-lookup.c.
| #define _GNU_SOURCE |
Definition at line 8 of file icon-lookup.c.
| void add_default_theme | ( | int | theme_index | ) |
Add theme to the list of default themes.
The theme that's added first will be used first for lookup. After that the inherited themes will be used and only after that the next default theme will be used.
| theme_index | The index of the theme as returned by load_icon_theme |
Definition at line 234 of file icon-lookup.c.
| char * find_icon_in_theme | ( | const char * | name, |
| int | theme_index, | ||
| int | size ) |
Find icon of specified size in selected theme.
This function will not return icons that cannot be scaled to size according to index.theme.
| name | Name of the icon or full path to it. |
| theme_index | Index of the theme to use. |
| size | Size of the icon. |
| NULL | if the icon cannot be found or is not readable. |
Definition at line 251 of file icon-lookup.c.
| char * find_icon_in_theme_with_inherit | ( | const char * | name, |
| int | theme_index, | ||
| int | size ) |
Definition at line 290 of file icon-lookup.c.
| char * find_icon_path | ( | const char * | name, |
| int | size ) |
Find icon of specified size in the default theme or an inherited theme.
This function will not return icons that cannot be scaled to size according to index.theme.
| name | Name of the icon or full path to it. |
| size | Size of the icon. |
| NULL | if the icon cannot be found or is not readable. |
Definition at line 308 of file icon-lookup.c.
| void finish_icon_theme | ( | struct icon_theme * | theme | ) |
Definition at line 205 of file icon-lookup.c.
| void finish_icon_theme_dir | ( | struct icon_theme_dir * | dir | ) |
Definition at line 199 of file icon-lookup.c.
| void free_all_themes | ( | void | ) |
Free all icon themes.
Definition at line 218 of file icon-lookup.c.
| int get_icon_theme | ( | char * | name | ) |
Definition at line 25 of file icon-lookup.c.
| void get_theme_path | ( | void | ) |
Definition at line 167 of file icon-lookup.c.
| int load_icon_theme | ( | char * | name | ) |
Load a theme with given name from a standard icon directory.
Don't call this function if the theme is already loaded.
| name | Name of the directory in which the theme is located. Note that it is NOT the name of the theme as specified in index.theme. |
| -1 | if the icon theme cannot be loaded. |
Definition at line 184 of file icon-lookup.c.
| int load_icon_theme_from_dir | ( | const char * | icon_dir, |
| const char * | subdir_theme ) |
Load a theme from a directory.
Don't call this function if the theme is already loaded. It also loads the inherited themes. If there are no inherited themes, the theme "hicolor" is inherited.
If it succeeds loading the theme, it adds theme to the list "icon_themes".
| icon_dir | A directory where icon themes are stored |
| subdir_theme | The subdirectory in which the theme is located |
| -1 | means no index was found |
Definition at line 47 of file icon-lookup.c.
| int default_themes_count = 0 |
Definition at line 23 of file icon-lookup.c.
| int* default_themes_index = NULL |
Definition at line 22 of file icon-lookup.c.
| struct icon_theme* icon_themes = NULL |
Definition at line 20 of file icon-lookup.c.
| int icon_themes_count = 0 |
Definition at line 21 of file icon-lookup.c.
| GPtrArray* theme_path = NULL |
Definition at line 165 of file icon-lookup.c.