summaryrefslogtreecommitdiffstats
path: root/minui/minui.h
diff options
context:
space:
mode:
Diffstat (limited to 'minui/minui.h')
-rw-r--r--minui/minui.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/minui/minui.h b/minui/minui.h
index 567d42157..cb1ed6588 100644
--- a/minui/minui.h
+++ b/minui/minui.h
@@ -17,6 +17,8 @@
#ifndef _MINUI_H_
#define _MINUI_H_
+#include <stdbool.h>
+
typedef void* gr_surface;
typedef unsigned short gr_pixel;
@@ -27,11 +29,13 @@ int gr_fb_width(void);
int gr_fb_height(void);
gr_pixel *gr_fb_data(void);
void gr_flip(void);
+void gr_fb_blank(bool blank);
void gr_color(unsigned char r, unsigned char g, unsigned char b, unsigned char a);
void gr_fill(int x, int y, int w, int h);
int gr_text(int x, int y, const char *s);
int gr_measure(const char *s);
+void gr_font_size(int *x, int *y);
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);
@@ -41,9 +45,21 @@ unsigned int gr_get_height(gr_surface surface);
// see http://www.mjmwired.net/kernel/Documentation/input/ for info.
struct input_event;
-int ev_init(void);
+typedef int (*ev_callback)(int fd, short revents, void *data);
+
+int ev_init(ev_callback input_cb, void *data);
void ev_exit(void);
-int ev_get(struct input_event *ev, unsigned dont_wait);
+int ev_add_fd(int fd, ev_callback 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_wait(int timeout);
+
+int ev_get_input(int fd, short revents, struct input_event *ev);
+void ev_dispatch(void);
// Resources