summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar Ian Fan <ianfan0@gmail.com>2020-03-04 14:34:32 +0000
committerLibravatar Simon Ser <contact@emersion.fr>2020-03-30 17:31:00 +0200
commit68f53cd509af8812562d743a55128a1b341247f5 (patch)
tree269042ba89e26b4124bb9f53cd9debf29e6f2599 /include
parenttray: allow themes to inherit from multiple themes (diff)
downloadsway-68f53cd509af8812562d743a55128a1b341247f5.tar.gz
sway-68f53cd509af8812562d743a55128a1b341247f5.tar.zst
sway-68f53cd509af8812562d743a55128a1b341247f5.zip
tray: tidy code
This includes some refactoring and fixing a small memory leak.
Diffstat (limited to 'include')
-rw-r--r--include/swaybar/tray/icon.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/include/swaybar/tray/icon.h b/include/swaybar/tray/icon.h
index 8e1d471e..3673674b 100644
--- a/include/swaybar/tray/icon.h
+++ b/include/swaybar/tray/icon.h
@@ -3,16 +3,16 @@
3 3
4#include "list.h" 4#include "list.h"
5 5
6enum subdir_type {
7 THRESHOLD,
8 SCALABLE,
9 FIXED
10};
11
12struct icon_theme_subdir { 6struct icon_theme_subdir {
13 char *name; 7 char *name;
14 int size; 8 int size;
15 enum subdir_type type; 9
10 enum {
11 THRESHOLD,
12 SCALABLE,
13 FIXED
14 } type;
15
16 int max_size; 16 int max_size;
17 int min_size; 17 int min_size;
18 int threshold; 18 int threshold;
@@ -39,6 +39,5 @@ void finish_themes(list_t *themes, list_t *basedirs);
39 */ 39 */
40char *find_icon(list_t *themes, list_t *basedirs, char *name, int size, 40char *find_icon(list_t *themes, list_t *basedirs, char *name, int size,
41 char *theme, int *min_size, int *max_size); 41 char *theme, int *min_size, int *max_size);
42char *find_icon_in_dir(char *name, char *dir, int *min_size, int *max_size);
43 42
44#endif 43#endif