Mercurial > sdl-ios-xcode
comparison 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 |
comparison
equal
deleted
inserted
replaced
2762:90de10bc38ec | 2763:6fc50bdd88c0 |
---|---|
27 #include "../SDL_sysvideo.h" | 27 #include "../SDL_sysvideo.h" |
28 | 28 |
29 #include <X11/Xlib.h> | 29 #include <X11/Xlib.h> |
30 #include <X11/Xutil.h> | 30 #include <X11/Xutil.h> |
31 #include <X11/Xatom.h> | 31 #include <X11/Xatom.h> |
32 #include <X11/extensions/XInput.h> | |
33 | 32 |
34 #if SDL_VIDEO_DRIVER_X11_XINERAMA | 33 #if SDL_VIDEO_DRIVER_X11_XINERAMA |
35 #include "../Xext/extensions/Xinerama.h" | 34 #include "../Xext/extensions/Xinerama.h" |
36 #endif | 35 #endif |
37 #if SDL_VIDEO_DRIVER_X11_XRANDR | 36 #if SDL_VIDEO_DRIVER_X11_XRANDR |
44 #include "../Xext/extensions/xme.h" | 43 #include "../Xext/extensions/xme.h" |
45 #endif | 44 #endif |
46 #if SDL_VIDEO_DRIVER_X11_DPMS | 45 #if SDL_VIDEO_DRIVER_X11_DPMS |
47 #include <X11/extensions/dpms.h> | 46 #include <X11/extensions/dpms.h> |
48 #endif | 47 #endif |
48 #if SDL_VIDEO_DRIVER_X11_XINPUT | |
49 #include <X11/extensions/XInput.h> | |
50 #endif | |
49 | 51 |
50 #include "SDL_x11dyn.h" | 52 #include "SDL_x11dyn.h" |
51 | 53 |
52 #include "SDL_x11events.h" | 54 #include "SDL_x11events.h" |
53 #include "SDL_x11gamma.h" | 55 #include "SDL_x11gamma.h" |
56 #include "SDL_x11mouse.h" | 58 #include "SDL_x11mouse.h" |
57 #include "SDL_x11opengl.h" | 59 #include "SDL_x11opengl.h" |
58 #include "SDL_x11window.h" | 60 #include "SDL_x11window.h" |
59 | 61 |
60 /* Private display data */ | 62 /* Private display data */ |
63 | |
64 #if SDL_VIDEO_DRIVER_X11_XINPUT | |
65 /* !!! FIXME: should be in SDL_VideoData, not globals. */ | |
66 extern XDevice **SDL_XDevices; | |
67 extern int SDL_NumOfXDevices; | |
68 extern XEventClass SDL_XEvents[256]; | |
69 extern int SDL_NumOfXEvents; | |
70 #endif | |
71 | |
72 /* !!! FIXME: should be in SDL_VideoData, not globals. */ | |
73 /* !!! FIXME: change these names, too. */ | |
74 extern int motion; /* the motion event id defined by an XInput function */ | |
75 extern int button_pressed; /* the button_pressed event id defined by an XInput function */ | |
76 extern int button_released; /* the button_released event id defined by an XInput function */ | |
77 extern int proximity_in; /* the proximity in event defined by an XInput function */ | |
78 extern int proximity_out; /* the proximity out event defined by an XInput function */ | |
61 | 79 |
62 typedef struct SDL_VideoData | 80 typedef struct SDL_VideoData |
63 { | 81 { |
64 Display *display; | 82 Display *display; |
65 char *classname; | 83 char *classname; |