aboutsummaryrefslogtreecommitdiff
path: root/src/IO/iowatch.hh
diff options
context:
space:
mode:
authorjcid <devnull@localhost>2007-10-07 00:36:34 +0200
committerjcid <devnull@localhost>2007-10-07 00:36:34 +0200
commit93715c46a99c96d6c866968312691ec9ab0f6a03 (patch)
tree573f19ec6aa740844f53a7c0eb7114f04096bf64 /src/IO/iowatch.hh
Initial revision
Diffstat (limited to 'src/IO/iowatch.hh')
-rw-r--r--src/IO/iowatch.hh25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/IO/iowatch.hh b/src/IO/iowatch.hh
new file mode 100644
index 00000000..681d0080
--- /dev/null
+++ b/src/IO/iowatch.hh
@@ -0,0 +1,25 @@
+#ifndef __IO_WATCH_H__
+#define __IO_WATCH_H__
+
+/*
+ * BUG: enum {READ = 1, WRITE = 4, EXCEPT = 8} borrowed from fltk/run.h
+ */
+#define DIO_READ 1
+#define DIO_WRITE 4
+#define DIO_EXCEPT 8
+
+typedef void (*CbFunction_t)(int fd, void *data);
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+void a_IOwatch_add_fd(int fd,int when,CbFunction_t Callback,void *usr_data);
+void a_IOwatch_remove_fd(int fd,int when);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __IO_WATCH_H__ */
+