diff options
author | David Robillard <d@drobilla.net> | 2014-01-27 17:16:47 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-01-27 17:16:47 +0000 |
commit | 69be0a7d6ed810faf6d5090c826df72c58b874f3 (patch) | |
tree | a6b1522181e79f9957e023d7c96f6bff018c4b5c /pugl/pugl_internal.h | |
parent | a983550a464d14ec2a79fa93021b2f02b64d20fa (diff) |
Require PUGL_VERBOSE to be defined for logging.
Add X focus grab hack from Robin Gareus.
Diffstat (limited to 'pugl/pugl_internal.h')
-rw-r--r-- | pugl/pugl_internal.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/pugl/pugl_internal.h b/pugl/pugl_internal.h index 88f59f2..74aae55 100644 --- a/pugl/pugl_internal.h +++ b/pugl/pugl_internal.h @@ -20,10 +20,25 @@ Note this file contains function definitions, so it must be compiled into the final binary exactly once. Each platform specific implementation file including it once should achieve this. + + If you are copying the pugl code into your source tree, the following + symbols can be defined to tweak pugl behaviour: + + PUGL_GRAB_FOCUS: Work around reparent keyboard issues by grabbing focus. + PUGL_VERBOSE: Print GL information to console. */ #include "pugl.h" +#ifdef PUGL_VERBOSE +# include <stdio.h> +# define PUGL_LOG(str) fprintf(stderr, "pugl: " str) +# define PUGL_LOGF(fmt, ...) fprintf(stderr, "pugl: " fmt, __VA_ARGS__) +#else +# define PUGL_LOG(str) +# define PUGL_LOGF(fmt, ...) +#endif + void puglDefaultReshape(PuglView* view, int width, int height); typedef struct PuglInternalsImpl PuglInternals; |