Mercurial > sdl-ios-xcode
comparison src/events/SDL_mouse_c.h @ 3760:64f346a83ed3 gsoc2008_manymouse
http://wilku.ravenlord.ws/doku.php?id=documentation for information how things work. Currently implemented: detecting many pointing devices and pressure detection. Still a bug. Each program has to be comipled with a flag -lXi
author | Szymon Wilczek <kazeuser@gmail.com> |
---|---|
date | Fri, 06 Jun 2008 15:23:29 +0000 |
parents | 003c1b5b07da |
children | 2970fcfbdd54 |
comparison
equal
deleted
inserted
replaced
3759:064c178558b7 | 3760:64f346a83ed3 |
---|---|
56 /* Free the mouse when it's time */ | 56 /* Free the mouse when it's time */ |
57 void (*FreeMouse) (SDL_Mouse * mouse); | 57 void (*FreeMouse) (SDL_Mouse * mouse); |
58 | 58 |
59 /* Data common to all mice */ | 59 /* Data common to all mice */ |
60 SDL_WindowID focus; | 60 SDL_WindowID focus; |
61 int which; | |
61 int x; | 62 int x; |
62 int y; | 63 int y; |
64 int z; | |
63 int xdelta; | 65 int xdelta; |
64 int ydelta; | 66 int ydelta; |
67 char* name; | |
65 Uint8 buttonstate; | 68 Uint8 buttonstate; |
66 SDL_bool relative_mode; | 69 SDL_bool relative_mode; |
67 SDL_bool flush_motion; | 70 SDL_bool flush_motion; |
68 | 71 |
69 SDL_Cursor *cursors; | 72 SDL_Cursor *cursors; |
82 extern SDL_Mouse *SDL_GetMouse(int index); | 85 extern SDL_Mouse *SDL_GetMouse(int index); |
83 | 86 |
84 /* Add a mouse, possibly reattaching at a particular index (or -1), | 87 /* Add a mouse, possibly reattaching at a particular index (or -1), |
85 returning the index of the mouse, or -1 if there was an error. | 88 returning the index of the mouse, or -1 if there was an error. |
86 */ | 89 */ |
87 extern int SDL_AddMouse(const SDL_Mouse * mouse, int index); | 90 extern int SDL_AddMouse(const SDL_Mouse * mouse, int index, char* name); |
88 | 91 |
89 /* Remove a mouse at an index, clearing the slot for later */ | 92 /* Remove a mouse at an index, clearing the slot for later */ |
90 extern void SDL_DelMouse(int index); | 93 extern void SDL_DelMouse(int index); |
91 | 94 |
92 /* Clear the button state of a mouse at an index */ | 95 /* Clear the button state of a mouse at an index */ |
94 | 97 |
95 /* Set the mouse focus window */ | 98 /* Set the mouse focus window */ |
96 extern void SDL_SetMouseFocus(int index, SDL_WindowID windowID); | 99 extern void SDL_SetMouseFocus(int index, SDL_WindowID windowID); |
97 | 100 |
98 /* Send a mouse motion event for a mouse at an index */ | 101 /* Send a mouse motion event for a mouse at an index */ |
99 extern int SDL_SendMouseMotion(int index, int relative, int x, int y); | 102 extern int SDL_SendMouseMotion(int index, int relative, int x, int y, int z); |
100 | 103 |
101 /* Send a mouse button event for a mouse at an index */ | 104 /* Send a mouse button event for a mouse at an index */ |
102 extern int SDL_SendMouseButton(int index, Uint8 state, Uint8 button); | 105 extern int SDL_SendMouseButton(int index, Uint8 state, Uint8 button); |
103 | 106 |
104 /* Send a mouse wheel event for a mouse at an index */ | 107 /* Send a mouse wheel event for a mouse at an index */ |
105 extern int SDL_SendMouseWheel(int index, int x, int y); | 108 extern int SDL_SendMouseWheel(int index, int x, int y); |
106 | 109 |
107 /* Shutdown the mouse subsystem */ | 110 /* Shutdown the mouse subsystem */ |
108 extern void SDL_MouseQuit(void); | 111 extern void SDL_MouseQuit(void); |
109 | 112 |
113 extern int SDL_GetIndexById(int id); | |
114 | |
115 extern void SDL_SetIndexId(int id, int index); | |
116 | |
117 extern int SDL_GetNumOfMice(void); | |
118 | |
119 extern char* SDL_GetMouseName(int index); | |
120 | |
121 | |
122 | |
110 #endif /* _SDL_mouse_c_h */ | 123 #endif /* _SDL_mouse_c_h */ |
111 | 124 |
112 /* vi: set ts=4 sw=4 expandtab: */ | 125 /* vi: set ts=4 sw=4 expandtab: */ |