From 896830e23e8f94b17bdf386c191a885c972ea8a8 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 26 Sep 2017 23:45:31 +0200 Subject: gl: Remove GLFW and reinstate FreeGLUT. GLFW doesn't build on Visual Studio 2005 anymore, and I don't have time to keep up with the changes. So, we're switching back to FreeGLUT, which is more stable. I've added the two missing features that made us switch to GLFW in the first place: input methods and system clipboard support. If MuPDF is compiled with our version of FreeGLUT, we now use these functions: * glutKeyboardExtFunc * glutSetClipboard * glutGetClipboard --- platform/gl/gl-app.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'platform/gl/gl-app.h') diff --git a/platform/gl/gl-app.h b/platform/gl/gl-app.h index 7bff257b..a43654cf 100644 --- a/platform/gl/gl-app.h +++ b/platform/gl/gl-app.h @@ -7,10 +7,9 @@ int win_open_file(char *buf, int len); #include "mupdf/fitz.h" #include "mupdf/ucdn.h" -#include +#include extern fz_context *ctx; -extern GLFWwindow *window; enum { @@ -57,7 +56,7 @@ struct ui int x, y; int down, middle, right; int scroll_x, scroll_y; - int key, mod; + int key, mod, plain; void *hot, *active, *focus; @@ -68,6 +67,9 @@ struct ui extern struct ui ui; +void ui_set_clipboard(const char *buf); +const char *ui_get_clipboard(void); + 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); -- cgit v1.2.3