Pressure levels. Documentation http://wilku.ravenlord.ws/doku.php?id=documentation
2 SDL - Simple DirectMedia Layer
3 Copyright (C) 1997-2006 Sam Lantinga
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 #include "SDL_config.h"
24 #ifndef _SDL_mouse_c_h
25 #define _SDL_mouse_c_h
27 typedef struct SDL_Mouse SDL_Mouse;
40 /* Create a cursor from a surface */
41 SDL_Cursor *(*CreateCursor) (SDL_Surface * surface, int hot_x, int hot_y);
43 /* Show the specified cursor, or hide if cursor is NULL */
44 int (*ShowCursor) (SDL_Cursor * cursor);
46 /* This is called when a mouse motion event occurs */
47 void (*MoveCursor) (SDL_Cursor * cursor);
49 /* Free a window manager cursor */
50 void (*FreeCursor) (SDL_Cursor * cursor);
52 /* Warp the mouse to (x,y) */
53 void (*WarpMouse) (SDL_Mouse * mouse, SDL_WindowID windowID, int x,
56 /* Free the mouse when it's time */
57 void (*FreeMouse) (SDL_Mouse * mouse);
59 /* Data common to all mice */
64 int z;/*for future use*/
70 int tilt;/*for future use*/
71 int rotation;/*for future use*/
74 SDL_bool relative_mode;
76 SDL_bool flush_motion;
79 SDL_Cursor *def_cursor;
80 SDL_Cursor *cur_cursor;
81 SDL_bool cursor_shown;
87 /* Initialize the mouse subsystem */
88 extern int SDL_MouseInit(void);
90 /* Get the mouse at an index */
91 extern SDL_Mouse *SDL_GetMouse(int index);
93 /* Add a mouse, possibly reattaching at a particular index (or -1),
94 returning the index of the mouse, or -1 if there was an error.
96 extern int SDL_AddMouse(const SDL_Mouse * mouse, int index, char* name, int pressure_max, int pressure_min);
98 /* Remove a mouse at an index, clearing the slot for later */
99 extern void SDL_DelMouse(int index);
101 /* Clear the button state of a mouse at an index */
102 extern void SDL_ResetMouse(int index);
104 /* Set the mouse focus window */
105 extern void SDL_SetMouseFocus(int index, SDL_WindowID windowID);
107 /* Send a mouse motion event for a mouse at an index */
108 extern int SDL_SendMouseMotion(int index, int relative, int x, int y, int z);
110 /* Send a mouse button event for a mouse at an index */
111 extern int SDL_SendMouseButton(int index, Uint8 state, Uint8 button);
113 /* Send a mouse wheel event for a mouse at an index */
114 extern int SDL_SendMouseWheel(int index, int x, int y);
116 /* Shutdown the mouse subsystem */
117 extern void SDL_MouseQuit(void);
119 extern int SDL_GetIndexById(int id);
121 extern void SDL_SetIndexId(int id, int index);
123 extern int SDL_GetNumOfMice(void);
125 extern char* SDL_GetMouseName(int index);
127 extern void SDL_UpdateCoordinates(int x, int y);
129 #endif /* _SDL_mouse_c_h */
131 /* vi: set ts=4 sw=4 expandtab: */