summaryrefslogtreecommitdiffstats
path: root/minui/minui.h
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-04-10 18:40:53 +0200
committerElliott Hughes <enh@google.com>2015-04-10 18:40:53 +0200
commit0713819fd256bfdfcf241c71195b7e8c4e18c742 (patch)
treee68f2fac4bb1c6de65c29b4886d135f05511b84a /minui/minui.h
parentMerge "Move the recovery image version out of the menu header." (diff)
downloadandroid_bootable_recovery-0713819fd256bfdfcf241c71195b7e8c4e18c742.tar
android_bootable_recovery-0713819fd256bfdfcf241c71195b7e8c4e18c742.tar.gz
android_bootable_recovery-0713819fd256bfdfcf241c71195b7e8c4e18c742.tar.bz2
android_bootable_recovery-0713819fd256bfdfcf241c71195b7e8c4e18c742.tar.lz
android_bootable_recovery-0713819fd256bfdfcf241c71195b7e8c4e18c742.tar.xz
android_bootable_recovery-0713819fd256bfdfcf241c71195b7e8c4e18c742.tar.zst
android_bootable_recovery-0713819fd256bfdfcf241c71195b7e8c4e18c742.zip
Diffstat (limited to '')
-rw-r--r--minui/minui.h35
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.