diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-10-14 16:34:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-14 16:34:22 +0200 |
commit | 53d90dd6a82205a20c3e97a8a396048588e1b5ef (patch) | |
tree | 10f5596fd0d90711af66281c38780c5a1d4d724f /include/swaybar/event_loop.h | |
parent | Update README.MD (and README.*.md) (diff) | |
parent | Event loop: Fix memmove and remove extraneous declaration (diff) | |
download | sway-53d90dd6a82205a20c3e97a8a396048588e1b5ef.tar.gz sway-53d90dd6a82205a20c3e97a8a396048588e1b5ef.tar.zst sway-53d90dd6a82205a20c3e97a8a396048588e1b5ef.zip |
Merge pull request #2826 from RyanDwyer/common-eventloop
Implement common event loop for swaybar and swaylock
Diffstat (limited to 'include/swaybar/event_loop.h')
-rw-r--r-- | include/swaybar/event_loop.h | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/include/swaybar/event_loop.h b/include/swaybar/event_loop.h deleted file mode 100644 index 47be5b79..00000000 --- a/include/swaybar/event_loop.h +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | #ifndef _SWAYBAR_EVENT_LOOP_H | ||
2 | #define _SWAYBAR_EVENT_LOOP_H | ||
3 | #include <stdbool.h> | ||
4 | #include <time.h> | ||
5 | |||
6 | void add_event(int fd, short mask, | ||
7 | void(*cb)(int fd, short mask, void *data), | ||
8 | void *data); | ||
9 | |||
10 | // Not guaranteed to notify cb immediately | ||
11 | void add_timer(timer_t timer, | ||
12 | void(*cb)(timer_t timer, void *data), | ||
13 | void *data); | ||
14 | |||
15 | // Returns false if nothing exists, true otherwise | ||
16 | bool remove_event(int fd); | ||
17 | |||
18 | // Returns false if nothing exists, true otherwise | ||
19 | bool remove_timer(timer_t timer); | ||
20 | |||
21 | // Blocks and returns after sending callbacks | ||
22 | void event_loop_poll(void); | ||
23 | |||
24 | void init_event_loop(void); | ||
25 | |||
26 | #endif | ||