diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2015-08-26 16:32:49 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2015-10-06 11:21:23 +0200 |
commit | a148b8a3f2457f9286f2dc49c5ea96b32e9cb56c (patch) | |
tree | a46c4eb535481d96d41c6b0a8ee06c0387fdc55f /platform/gl/gl-app.h | |
parent | d1d9d13d1114fea2578004c338d8f6a9932159b2 (diff) | |
download | mupdf-a148b8a3f2457f9286f2dc49c5ea96b32e9cb56c.tar.xz |
gl: Add an internal header file for GL application.
Diffstat (limited to 'platform/gl/gl-app.h')
-rw-r--r-- | platform/gl/gl-app.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/platform/gl/gl-app.h b/platform/gl/gl-app.h new file mode 100644 index 00000000..2ecee262 --- /dev/null +++ b/platform/gl/gl-app.h @@ -0,0 +1,23 @@ +#include "mupdf/fitz.h" +#include <GLFW/glfw3.h> + +struct ui +{ + int x, y, down, middle, right; + void *hot, *active; + + int fontsize; + int baseline; + int lineheight; +}; + +extern struct ui ui; + +void ui_init_fonts(fz_context *ctx, float pixelsize); +void ui_finish_fonts(fz_context *ctx); +float ui_measure_character(fz_context *ctx, int ucs); +void ui_begin_text(fz_context *ctx); +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); |