diff options
Diffstat (limited to 'platform/gl/gl-app.h')
-rw-r--r-- | platform/gl/gl-app.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/platform/gl/gl-app.h b/platform/gl/gl-app.h index 2a00bec4..1cf5b91b 100644 --- a/platform/gl/gl-app.h +++ b/platform/gl/gl-app.h @@ -1,13 +1,15 @@ #include "mupdf/fitz.h" #include <GLFW/glfw3.h> +extern fz_context *ctx; + struct ui { int x, y; int down, middle, right; int key, special, mod; - void *hot, *active; + void *hot, *active, *focus; int fontsize; int baseline; @@ -24,3 +26,11 @@ float ui_draw_character(fz_context *ctx, int ucs, float x, float y); void ui_end_text(fz_context *ctx); float ui_draw_string(fz_context *ctx, float x, float y, const char *str); float ui_measure_string(fz_context *ctx, char *str); + +struct input +{ + int text[256]; + int *end, *p, *q; +}; + +int ui_input(int x0, int y0, int x1, int y1, struct input *input); |