aboutsummaryrefslogtreecommitdiffhomepage
path: root/input_common.h
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-04-03 13:49:58 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-04-03 13:49:58 -0700
commit1543d02f96bdf96a067e96742577ea740dda4d89 (patch)
tree455d72f7cc027ab3dde815662222675331b2261f /input_common.h
parent11a444e914820bd8dc9a0f2e87e2585137af713b (diff)
Add callbacks that get invoked before the next call to select(), which will allow for a nice fix to https://github.com/fish-shell/fish-shell/issues/608. Eliminate the poll handler, and replace it with this mechanism.
Diffstat (limited to 'input_common.h')
-rw-r--r--input_common.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/input_common.h b/input_common.h
index 7af52761..02b7359e 100644
--- a/input_common.h
+++ b/input_common.h
@@ -30,9 +30,6 @@ enum
*/
void input_common_init(int (*ih)());
-/* Sets a callback to be invoked every time a byte is read */
-void input_common_set_poll_callback(void (*handler)(void));
-
/**
Free memory used by the library
*/
@@ -56,4 +53,9 @@ wchar_t input_common_readch(int timed);
*/
void input_common_unreadch(wint_t ch);
+/** Adds a callback to be invoked at the next turn of the "event loop." The callback function will be invoked and passed arg. */
+void input_common_add_callback(void (*callback)(void *), void *arg);
+
+
+
#endif