Mercurial > sdl-ios-xcode
diff src/video/x11/SDL_x11video.h @ 2763:6fc50bdd88c0
Some cleanups on the new XInput code.
One or two things got moved around, but largely this is hooked up correctly
in the Unix configure system now: it can be dynamically loaded and fallback
gracefully if not available, or libXi can be directly linked to libSDL.
XInput support can be --disable'd from the configure script, too (defaults to
enabled).
Please note that while the framework is in place to gracefully fallback, the
current state of the source requires XInput. We'll need to adjust a few
things still to correct this.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Wed, 17 Sep 2008 08:20:57 +0000 |
parents | 79c1bd651f04 |
children | 99210400e8b9 |
line wrap: on
line diff
--- a/src/video/x11/SDL_x11video.h Mon Sep 15 20:48:51 2008 +0000 +++ b/src/video/x11/SDL_x11video.h Wed Sep 17 08:20:57 2008 +0000 @@ -29,7 +29,6 @@ #include <X11/Xlib.h> #include <X11/Xutil.h> #include <X11/Xatom.h> -#include <X11/extensions/XInput.h> #if SDL_VIDEO_DRIVER_X11_XINERAMA #include "../Xext/extensions/Xinerama.h" @@ -46,6 +45,9 @@ #if SDL_VIDEO_DRIVER_X11_DPMS #include <X11/extensions/dpms.h> #endif +#if SDL_VIDEO_DRIVER_X11_XINPUT +#include <X11/extensions/XInput.h> +#endif #include "SDL_x11dyn.h" @@ -59,6 +61,22 @@ /* Private display data */ +#if SDL_VIDEO_DRIVER_X11_XINPUT +/* !!! FIXME: should be in SDL_VideoData, not globals. */ +extern XDevice **SDL_XDevices; +extern int SDL_NumOfXDevices; +extern XEventClass SDL_XEvents[256]; +extern int SDL_NumOfXEvents; +#endif + +/* !!! FIXME: should be in SDL_VideoData, not globals. */ +/* !!! FIXME: change these names, too. */ +extern int motion; /* the motion event id defined by an XInput function */ +extern int button_pressed; /* the button_pressed event id defined by an XInput function */ +extern int button_released; /* the button_released event id defined by an XInput function */ +extern int proximity_in; /* the proximity in event defined by an XInput function */ +extern int proximity_out; /* the proximity out event defined by an XInput function */ + typedef struct SDL_VideoData { Display *display;