diff options
author | Tao Bao <tbao@google.com> | 2017-01-25 01:49:47 +0100 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-01-25 01:49:48 +0100 |
commit | a47631271467248fd90fe1a628bb9249151c7e32 (patch) | |
tree | 12ac49a577a66cf61ef1d38f70d63e9cedd559b6 /minui/include | |
parent | Merge "update_verifier: Move property_get() to android::base::GetProperty()." (diff) | |
parent | minui: Move callback functions to std::function. (diff) | |
download | android_bootable_recovery-a47631271467248fd90fe1a628bb9249151c7e32.tar android_bootable_recovery-a47631271467248fd90fe1a628bb9249151c7e32.tar.gz android_bootable_recovery-a47631271467248fd90fe1a628bb9249151c7e32.tar.bz2 android_bootable_recovery-a47631271467248fd90fe1a628bb9249151c7e32.tar.lz android_bootable_recovery-a47631271467248fd90fe1a628bb9249151c7e32.tar.xz android_bootable_recovery-a47631271467248fd90fe1a628bb9249151c7e32.tar.zst android_bootable_recovery-a47631271467248fd90fe1a628bb9249151c7e32.zip |
Diffstat (limited to 'minui/include')
-rw-r--r-- | minui/include/minui/minui.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/minui/include/minui/minui.h b/minui/include/minui/minui.h index 78890b84b..a1749dfe6 100644 --- a/minui/include/minui/minui.h +++ b/minui/include/minui/minui.h @@ -70,15 +70,14 @@ unsigned int gr_get_height(GRSurface* surface); struct input_event; -// TODO: move these over to std::function. -typedef int (*ev_callback)(int fd, uint32_t epevents, void* data); -typedef int (*ev_set_key_callback)(int code, int value, void* data); +using ev_callback = std::function<int(int fd, uint32_t epevents)>; +using ev_set_key_callback = std::function<int(int code, int value)>; -int ev_init(ev_callback input_cb, void* data); +int ev_init(ev_callback input_cb); void ev_exit(); -int ev_add_fd(int fd, ev_callback cb, void* data); +int ev_add_fd(int fd, ev_callback cb); void ev_iterate_available_keys(const std::function<void(int)>& f); -int ev_sync_key_state(ev_set_key_callback set_key_cb, void* data); +int ev_sync_key_state(const ev_set_key_callback& set_key_cb); // 'timeout' has the same semantics as poll(2). // 0 : don't block |