comparison src/events/SDL_mouse_c.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 6ce28e5287e9
children 64ce267332c6
comparison
equal deleted inserted replaced
2939:084e5b4fc5be 2940:b93965a16fe0
62 int rotation; /* for future use */ 62 int rotation; /* for future use */
63 int total_ends; 63 int total_ends;
64 int current_end; 64 int current_end;
65 65
66 /* Data common to all mice */ 66 /* Data common to all mice */
67 int id;
67 SDL_WindowID focus; 68 SDL_WindowID focus;
68 int which; 69 int which;
69 int x; 70 int x;
70 int y; 71 int y;
71 int z; /* for future use */ 72 int z; /* for future use */
87 }; 88 };
88 89
89 /* Initialize the mouse subsystem */ 90 /* Initialize the mouse subsystem */
90 extern int SDL_MouseInit(void); 91 extern int SDL_MouseInit(void);
91 92
92 /* Assign an id to a mouse at an index */
93 extern int SDL_SetMouseIndexId(int id, int index);
94
95 /* Get the index of a mouse specified by id */
96 extern int SDL_GetMouseIndexId(int id);
97
98 /* Get the mouse at an index */ 93 /* Get the mouse at an index */
99 extern SDL_Mouse *SDL_GetMouse(int index); 94 extern SDL_Mouse *SDL_GetMouse(int index);
100 95
101 /* Add a mouse, possibly reattaching at a particular index (or -1), 96 /* Add a mouse, possibly reattaching at a particular index (or -1),
102 returning the index of the mouse, or -1 if there was an error. 97 returning the index of the mouse, or -1 if there was an error.
103 */ 98 */
104 extern int SDL_AddMouse(const SDL_Mouse * mouse, int index, char *name, 99 extern int SDL_AddMouse(const SDL_Mouse * mouse, char *name,
105 int pressure_max, int pressure_min, int ends); 100 int pressure_max, int pressure_min, int ends);
106 101
107 /* Remove a mouse at an index, clearing the slot for later */ 102 /* Remove a mouse at an index, clearing the slot for later */
108 extern void SDL_DelMouse(int index); 103 extern void SDL_DelMouse(int index);
109 104