1 /* This file copied from the X11 package */ 2 3 /* ----------------------------------------------------------------------------- 4 * Definitions for package `X11' which are visible in Haskell land. 5 * ---------------------------------------------------------------------------* 6 */ 7 8 #ifndef XLIBEXTRAS_H 9 #define XLIBEXTRAS_H 10 #include <stdlib.h> 11 /* This doesn't always work, so we play safe below... */ 12 #define XUTIL_DEFINE_FUNCTIONS 13 #include <X11/X.h> 14 #include <X11/X.h> 15 #include <X11/Xlib.h> 16 #include <X11/Xatom.h> 17 #include <X11/Xutil.h> 18 #include <X11/Xproto.h> 19 20 #include <X11/extensions/Xrandr.h> 21 #include <X11/extensions/scrnsaver.h> 22 23 /* Xutil.h overrides some functions with macros. 24 * In recent versions of X this can be turned off with 25 * #define XUTIL_DEFINE_FUNCTIONS 26 * before the #include, but this doesn't work with older versions. 27 * As a workaround, we undef the macros here. Note that this is only 28 * safe for functions with return type int. 29 */ 30 #undef XDestroyImage 31 #undef XGetPixel 32 #undef XPutPixel 33 #undef XSubImage 34 #undef XAddPixel 35 #define XK_MISCELLANY 36 #define XK_LATIN1 37 #include <X11/keysymdef.h> 38 #endif 39 40 void x11_extras_set_error_handler(); 41 int x11_extras_IsCursorKey(KeySym keysym); 42 int x11_extras_IsFunctionKey(KeySym keysym); 43 int x11_extras_IsKeypadKey(KeySym keysym); 44 int x11_extras_IsMiscFunctionKey(KeySym keysym); 45 int x11_extras_IsModifierKey(KeySym keysym); 46 int x11_extras_IsPFKey(KeySym keysym); 47 int x11_extras_IsPrivateKeypadKey(KeySym keysym); 48