summaryrefslogtreecommitdiffstats
path: root/include/swaybar/event_loop.h
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2017-06-14 18:53:32 -0400
committerLibravatar GitHub <noreply@github.com>2017-06-14 18:53:32 -0400
commiteb6e38c86d2deb37cc6f378f8644c4a530fd7448 (patch)
treee3c567c4684faf0f9a7f77494f1bf638171d5349 /include/swaybar/event_loop.h
parentMerge pull request #1236 from ykrivopalov/fix_complex_status_command (diff)
parentMerge branch 'master' into tray (diff)
downloadsway-eb6e38c86d2deb37cc6f378f8644c4a530fd7448.tar.gz
sway-eb6e38c86d2deb37cc6f378f8644c4a530fd7448.tar.zst
sway-eb6e38c86d2deb37cc6f378f8644c4a530fd7448.zip
Merge pull request #1234 from 4e554c4c/tray
Implement Tray Icons
Diffstat (limited to 'include/swaybar/event_loop.h')
-rw-r--r--include/swaybar/event_loop.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/swaybar/event_loop.h b/include/swaybar/event_loop.h
new file mode 100644
index 00000000..a0cde07f
--- /dev/null
+++ b/include/swaybar/event_loop.h
@@ -0,0 +1,26 @@
1#ifndef _SWAYBAR_EVENT_LOOP_H
2#define _SWAYBAR_EVENT_LOOP_H
3
4#include <stdbool.h>
5#include <time.h>
6
7void add_event(int fd, short mask,
8 void(*cb)(int fd, short mask, void *data),
9 void *data);
10
11// Not guaranteed to notify cb immediately
12void add_timer(timer_t timer,
13 void(*cb)(timer_t timer, void *data),
14 void *data);
15
16// Returns false if nothing exists, true otherwise
17bool remove_event(int fd);
18
19// Returns false if nothing exists, true otherwise
20bool remove_timer(timer_t timer);
21
22// Blocks and returns after sending callbacks
23void event_loop_poll();
24
25void init_event_loop();
26#endif /*_SWAYBAR_EVENT_LOOP_H */