aboutsummaryrefslogtreecommitdiff
path: root/src/lib/include/kogata/mainloop.h
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2018-04-01 23:23:34 +0200
committerAlex Auvolat <alex@adnab.me>2018-04-01 23:23:34 +0200
commita36c6528b10cb5b5d48fbf30a941443f738c9dd1 (patch)
tree19249d98dbe3a55d5f18050797959d7ca64a97bd /src/lib/include/kogata/mainloop.h
parent67db86ec53336da886153797deb643483e9596d0 (diff)
downloadkogata-a36c6528b10cb5b5d48fbf30a941443f738c9dd1.tar.gz
kogata-a36c6528b10cb5b5d48fbf30a941443f738c9dd1.zip
Terminal inside Lua window manager
Diffstat (limited to 'src/lib/include/kogata/mainloop.h')
-rw-r--r--src/lib/include/kogata/mainloop.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/include/kogata/mainloop.h b/src/lib/include/kogata/mainloop.h
index 2b447ef..6352916 100644
--- a/src/lib/include/kogata/mainloop.h
+++ b/src/lib/include/kogata/mainloop.h
@@ -12,6 +12,7 @@ typedef struct mainloop_fd mainloop_fd_t;
typedef void (*buf_full_callback_t)(mainloop_fd_t *fd);
typedef void (*fd_error_callback_t)(mainloop_fd_t *fd);
+typedef void (*idle_callback_t)(void* data);
typedef struct {
size_t size, written;
@@ -41,6 +42,7 @@ void mainloop_rm_fd(mainloop_fd_t* fd);
void mainloop_expect(mainloop_fd_t *fd, void* buf, size_t size, buf_full_callback_t cb);
bool mainloop_nonblocking_write(mainloop_fd_t *fd, void* buf, size_t size, bool must_free_buf);
+void mainloop_when_idle(idle_callback_t cb, void* data);
void mainloop_run();
void mainloop_exit();