aboutsummaryrefslogtreecommitdiffstats
path: root/minui/minui.h
diff options
context:
space:
mode:
authorDima Zavin <dima@android.com>2011-10-12 15:53:29 -0700
committerDima Zavin <dima@android.com>2011-10-12 15:53:32 -0700
commit441031dadc4f5e8c1487468229781702bc08fb14 (patch)
treeadf5c20706637eaa5fe978a00d3cde71023f4b02 /minui/minui.h
parentf6abd409bb2b80dfa0c1c03c26bc83141f52c673 (diff)
downloadbootable_recovery-441031dadc4f5e8c1487468229781702bc08fb14.zip
bootable_recovery-441031dadc4f5e8c1487468229781702bc08fb14.tar.gz
bootable_recovery-441031dadc4f5e8c1487468229781702bc08fb14.tar.bz2
minui: add ability to synchronize current key state
If a key is down prior to the time of initialization, we would not get the down event for the key, and thus think that the key is not pressed. Add an interface that allows one to provide a callback to execute on all keys that are currently down. Change-Id: I2a4096c0cb4c7c7a9a80d207835f168a0b418413 Signed-off-by: Dima Zavin <dima@android.com>
Diffstat (limited to 'minui/minui.h')
-rw-r--r--minui/minui.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/minui/minui.h b/minui/minui.h
index cb1ed65..2e2f1f4 100644
--- a/minui/minui.h
+++ b/minui/minui.h
@@ -46,10 +46,12 @@ unsigned int gr_get_height(gr_surface surface);
struct input_event;
typedef int (*ev_callback)(int fd, short revents, void *data);
+typedef int (*ev_set_key_callback)(int code, int value, void *data);
int ev_init(ev_callback input_cb, void *data);
void ev_exit(void);
int ev_add_fd(int fd, ev_callback cb, void *data);
+int ev_sync_key_state(ev_set_key_callback set_key_cb, void *data);
/* timeout has the same semantics as for poll
* 0 : don't block