aboutsummaryrefslogtreecommitdiff
path: root/fdm.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-10-30 16:31:44 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-10-30 16:31:44 +0000
commitad0f8a02d56709bd59211ff6a5d485a380d708f0 (patch)
treecfabf659cbb1cf2219b982842f5d7b1249034f78 /fdm.h
parentscrollback: regression: fix rendering of scrollback diffs less than a screen (diff)
parentslave: rename slave_spawn() -> slave_exec() (diff)
Merge branch 'fdm'
Diffstat (limited to 'fdm.h')
-rw-r--r--fdm.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/fdm.h b/fdm.h
new file mode 100644
index 00000000..cd0fee2a
--- /dev/null
+++ b/fdm.h
@@ -0,0 +1,15 @@
+#pragma once
+
+#include <stdbool.h>
+
+struct fdm;
+
+typedef bool (*fdm_handler_t)(struct fdm *fdm, int fd, int events, void *data);
+
+struct fdm *fdm_init(void);
+void fdm_destroy(struct fdm *fdm);
+
+bool fdm_add(struct fdm *fdm, int fd, int events, fdm_handler_t handler, void *data);
+bool fdm_del(struct fdm *fdm, int fd);
+
+bool fdm_poll(struct fdm *fdm);