diff options
author | Elliott Hughes <enh@google.com> | 2015-04-10 19:32:32 +0200 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-04-10 19:32:32 +0200 |
commit | 71bc735547b73d96f65b60bc418b26d9b9477a90 (patch) | |
tree | e68f2fac4bb1c6de65c29b4886d135f05511b84a /minui/minui.h | |
parent | am 5f3dee94: am f471861e: Merge "Move the recovery image version out of the menu header." (diff) | |
parent | am 18eaa0cf: Merge "Add ev_iterate_available_keys to minui." (diff) | |
download | android_bootable_recovery-71bc735547b73d96f65b60bc418b26d9b9477a90.tar android_bootable_recovery-71bc735547b73d96f65b60bc418b26d9b9477a90.tar.gz android_bootable_recovery-71bc735547b73d96f65b60bc418b26d9b9477a90.tar.bz2 android_bootable_recovery-71bc735547b73d96f65b60bc418b26d9b9477a90.tar.lz android_bootable_recovery-71bc735547b73d96f65b60bc418b26d9b9477a90.tar.xz android_bootable_recovery-71bc735547b73d96f65b60bc418b26d9b9477a90.tar.zst android_bootable_recovery-71bc735547b73d96f65b60bc418b26d9b9477a90.zip |
Diffstat (limited to 'minui/minui.h')
-rw-r--r-- | minui/minui.h | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/minui/minui.h b/minui/minui.h index 733b675f3..8f2ff1139 100644 --- a/minui/minui.h +++ b/minui/minui.h @@ -25,6 +25,10 @@ extern "C" { #endif +// +// Graphics. +// + typedef struct { int width; int height; @@ -56,30 +60,35 @@ void gr_blit(gr_surface source, int sx, int sy, int w, int h, int dx, int dy); unsigned int gr_get_width(gr_surface surface); unsigned int gr_get_height(gr_surface surface); -// input event structure, include <linux/input.h> for the definition. -// see http://www.mjmwired.net/kernel/Documentation/input/ for info. +// +// Input events. +// + struct input_event; -typedef int (*ev_callback)(int fd, uint32_t epevents, void *data); -typedef int (*ev_set_key_callback)(int code, int value, void *data); +typedef int (*ev_callback)(int fd, uint32_t epevents, void* data); +typedef int (*ev_set_key_callback)(int code, int value, void* data); +typedef void (*ev_key_callback)(int code, void* data); -int ev_init(ev_callback input_cb, 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 - * < 0 : block forever - * > 0 : block for 'timeout' milliseconds - */ +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); +void ev_iterate_available_keys(ev_key_callback cb, void* data); + +// 'timeout' has the same semantics as poll(2). +// 0 : don't block +// < 0 : block forever +// > 0 : block for 'timeout' milliseconds int ev_wait(int timeout); int ev_get_input(int fd, uint32_t epevents, struct input_event *ev); void ev_dispatch(void); int ev_get_epollfd(void); +// // Resources +// // res_create_*_surface() functions return 0 if no error, else // negative. |