aboutsummaryrefslogtreecommitdiff
path: root/src/lib/include/kogata/mainloop.h
diff options
context:
space:
mode:
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();