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>
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 @@
 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