comparison src/video/x11/SDL_x11mouse.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 f7b03b6838cb
comparison
equal deleted inserted replaced
2939:084e5b4fc5be 2940:b93965a16fe0
22 #include "SDL_config.h" 22 #include "SDL_config.h"
23 23
24 #ifndef _SDL_x11mouse_h 24 #ifndef _SDL_x11mouse_h
25 #define _SDL_x11mouse_h 25 #define _SDL_x11mouse_h
26 26
27 #if SDL_VIDEO_DRIVER_X11_XINPUT
28 typedef struct X11_MouseData
29 {
30 Display *display;
31 XDevice *device;
32 int motion;
33 int button_pressed;
34 int button_released;
35 int proximity_in;
36 int proximity_out;
37 int num_xevents;
38 XEventClass xevents[5];
39 } X11_MouseData;
40 #endif
41
27 extern void X11_InitMouse(_THIS); 42 extern void X11_InitMouse(_THIS);
28 extern void X11_QuitMouse(_THIS); 43 extern void X11_QuitMouse(_THIS);
29 44
30 #endif /* _SDL_x11mouse_h */ 45 #endif /* _SDL_x11mouse_h */
31 46