Mercurial > sdl-ios-xcode
comparison src/video/x11/SDL_x11video.h @ 2940:b93965a16fe0
Fixed X11 mouse motion/button events - it's not actually safe to cast mouse events to device events.
Fixed building SDL without XInput support
Simplified the process of registering a mouse device
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 01 Jan 2009 07:59:08 +0000 |
parents | 99210400e8b9 |
children | ee331407574f |
comparison
equal
deleted
inserted
replaced
2939:084e5b4fc5be | 2940:b93965a16fe0 |
---|---|
59 #include "SDL_x11opengl.h" | 59 #include "SDL_x11opengl.h" |
60 #include "SDL_x11window.h" | 60 #include "SDL_x11window.h" |
61 | 61 |
62 /* Private display data */ | 62 /* Private display data */ |
63 | 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 */ | |
79 | |
80 typedef struct SDL_VideoData | 64 typedef struct SDL_VideoData |
81 { | 65 { |
82 Display *display; | 66 Display *display; |
83 char *classname; | 67 char *classname; |
84 XIM im; | 68 XIM im; |
85 int screensaver_timeout; | 69 int screensaver_timeout; |
86 BOOL dpms_enabled; | 70 BOOL dpms_enabled; |
87 int numwindows; | 71 int numwindows; |
88 SDL_WindowData **windowlist; | 72 SDL_WindowData **windowlist; |
89 int windowlistlength; | 73 int windowlistlength; |
90 int mouse; | |
91 int keyboard; | 74 int keyboard; |
92 Atom WM_DELETE_WINDOW; | 75 Atom WM_DELETE_WINDOW; |
93 SDL_scancode key_layout[256]; | 76 SDL_scancode key_layout[256]; |
94 } SDL_VideoData; | 77 } SDL_VideoData; |
95 | 78 |