icon.h
This file
Path
icon.h
39 lines · 871 bytes · C
Last changed by
icon: in application mode (not dmenu), filter out non-application icon theme dirsDaniel Eklöfbefore adoption40964b5
History of this fileTake it
1#pragma once23#include <stdbool.h>45#include "application.h"6#include "tllist.h"78enum icon_dir_type {9 ICON_DIR_FIXED,10 ICON_DIR_SCALABLE,11 ICON_DIR_THRESHOLD,12};1314struct icon_dir {15 char *path; /* Relative to theme's base path */16 int size;17 int min_size;18 int max_size;19 int scale;20 int threshold;21 enum icon_dir_type type;22};2324struct icon_theme {25 char *name;26 tll(struct icon_dir) dirs;27};2829typedef tll(struct icon_theme) icon_theme_list_t;3031icon_theme_list_t icon_load_theme(const char *name, bool filter_context);32void icon_themes_destroy(icon_theme_list_t themes);3334bool icon_lookup_application_icons(35 icon_theme_list_t themes, int icon_size,36 struct application_list *applications);3738bool icon_from_png(struct icon *icon, const char *name, bool gamma_correct);39bool icon_from_svg(struct icon *icon, const char *name);