diff options
author | Ian Fan <ianfan0@gmail.com> | 2018-10-26 09:44:01 +0100 |
---|---|---|
committer | Ian Fan <ianfan0@gmail.com> | 2018-12-31 20:40:18 +0000 |
commit | 598e950296ce9fef24b54b4c01302ee68473fb8a (patch) | |
tree | 6d883427f91c8c74b7101af4321a56c7fb98dc34 | |
parent | Apply implicit fallback seat config (diff) | |
download | sway-598e950296ce9fef24b54b4c01302ee68473fb8a.tar.gz sway-598e950296ce9fef24b54b4c01302ee68473fb8a.tar.zst sway-598e950296ce9fef24b54b4c01302ee68473fb8a.zip |
swaybar: remove old tray implementation
-rw-r--r-- | include/swaybar/tray/icon.h | 16 | ||||
-rw-r--r-- | include/swaybar/tray/sni.h | 82 |
2 files changed, 0 insertions, 98 deletions
diff --git a/include/swaybar/tray/icon.h b/include/swaybar/tray/icon.h deleted file mode 100644 index 1cc6ff9c..00000000 --- a/include/swaybar/tray/icon.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | #ifndef _SWAYBAR_ICON_H | ||
2 | #define _SWAYBAR_ICON_H | ||
3 | |||
4 | #include <stdint.h> | ||
5 | #include <stdbool.h> | ||
6 | #include <client/cairo.h> | ||
7 | |||
8 | /** | ||
9 | * Returns the image found by `name` that is closest to `size` | ||
10 | */ | ||
11 | cairo_surface_t *find_icon(const char *name, int size); | ||
12 | |||
13 | /* Struct used internally only */ | ||
14 | struct subdir; | ||
15 | |||
16 | #endif /* _SWAYBAR_ICON_H */ | ||
diff --git a/include/swaybar/tray/sni.h b/include/swaybar/tray/sni.h deleted file mode 100644 index c2544e2a..00000000 --- a/include/swaybar/tray/sni.h +++ /dev/null | |||
@@ -1,82 +0,0 @@ | |||
1 | #ifndef _SWAYBAR_SNI_H | ||
2 | #define _SWAYBAR_SNI_H | ||
3 | |||
4 | #include <stdbool.h> | ||
5 | #include <client/cairo.h> | ||
6 | |||
7 | struct StatusNotifierItem { | ||
8 | /* Name registered to sni watcher */ | ||
9 | char *name; | ||
10 | /* Unique bus name, needed for determining signal origins */ | ||
11 | char *unique_name; | ||
12 | bool kde_special_snowflake; | ||
13 | |||
14 | cairo_surface_t *image; | ||
15 | bool dirty; | ||
16 | }; | ||
17 | |||
18 | /* Each output holds an sni_icon_ref of each item to render */ | ||
19 | struct sni_icon_ref { | ||
20 | cairo_surface_t *icon; | ||
21 | struct StatusNotifierItem *ref; | ||
22 | }; | ||
23 | |||
24 | struct sni_icon_ref *sni_icon_ref_create(struct StatusNotifierItem *item, | ||
25 | int height); | ||
26 | |||
27 | void sni_icon_ref_free(struct sni_icon_ref *sni_ref); | ||
28 | |||
29 | /** | ||
30 | * Will return a new item and get its icon. (see warning below) | ||
31 | * May return `NULL` if `name` is not valid. | ||
32 | */ | ||
33 | struct StatusNotifierItem *sni_create(const char *name); | ||
34 | |||
35 | /** | ||
36 | * `item` must be a struct StatusNotifierItem * | ||
37 | * `str` must be a NUL terminated char * | ||
38 | * | ||
39 | * Returns 0 if `item` has a name of `str` | ||
40 | */ | ||
41 | int sni_str_cmp(const void *item, const void *str); | ||
42 | |||
43 | /** | ||
44 | * Returns 0 if `item` has a unique name of `str` or if | ||
45 | * `item->unique_name == NULL` | ||
46 | */ | ||
47 | int sni_uniq_cmp(const void *item, const void *str); | ||
48 | |||
49 | /** | ||
50 | * Gets an icon for the given item if found. | ||
51 | * | ||
52 | * XXX | ||
53 | * This function keeps a reference to the item until it gets responses, make | ||
54 | * sure that the reference and item are valid during this time. | ||
55 | */ | ||
56 | void get_icon(struct StatusNotifierItem *item); | ||
57 | |||
58 | /** | ||
59 | * Calls the "activate" method on the given StatusNotifierItem | ||
60 | * | ||
61 | * x and y should be where the item was clicked | ||
62 | */ | ||
63 | void sni_activate(struct StatusNotifierItem *item, uint32_t x, uint32_t y); | ||
64 | |||
65 | /** | ||
66 | * Asks the item to draw a context menu at the given x and y coords | ||
67 | */ | ||
68 | void sni_context_menu(struct StatusNotifierItem *item, uint32_t x, uint32_t y); | ||
69 | |||
70 | /** | ||
71 | * Calls the "secondary activate" method on the given StatusNotifierItem | ||
72 | * | ||
73 | * x and y should be where the item was clicked | ||
74 | */ | ||
75 | void sni_secondary(struct StatusNotifierItem *item, uint32_t x, uint32_t y); | ||
76 | |||
77 | /** | ||
78 | * Deconstructs `item` | ||
79 | */ | ||
80 | void sni_free(struct StatusNotifierItem *item); | ||
81 | |||
82 | #endif /* _SWAYBAR_SNI_H */ | ||