00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00029 #ifndef _SDL_mouse_h
00030 #define _SDL_mouse_h
00031
00032 #include "SDL_stdinc.h"
00033 #include "SDL_error.h"
00034 #include "SDL_video.h"
00035
00036 #include "begin_code.h"
00037
00038 #ifdef __cplusplus
00039
00040 extern "C" {
00041
00042 #endif
00043
00044 typedef struct SDL_Cursor SDL_Cursor;
00045
00046
00047
00055 extern DECLSPEC int SDLCALL SDL_GetNumMice(void);
00056
00066 extern DECLSPEC char *SDLCALL SDL_GetMouseName(int index);
00067
00079 extern DECLSPEC int SDLCALL SDL_SelectMouse(int index);
00080
00086 extern DECLSPEC SDL_WindowID SDLCALL SDL_GetMouseFocusWindow(int index);
00087
00106 extern DECLSPEC int SDLCALL SDL_SetRelativeMouseMode(int index,
00107 SDL_bool enabled);
00108
00116 extern DECLSPEC SDL_bool SDLCALL SDL_GetRelativeMouseMode(int index);
00117
00128 extern DECLSPEC Uint8 SDLCALL SDL_GetMouseState(int index, int *x, int *y);
00129
00139 extern DECLSPEC Uint8 SDLCALL SDL_GetRelativeMouseState(int index, int *x,
00140 int *y);
00141
00153 extern DECLSPEC void SDLCALL SDL_WarpMouseInWindow(SDL_WindowID windowID,
00154 int x, int y);
00155
00173 extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateCursor(const Uint8 * data,
00174 const Uint8 * mask,
00175 int w, int h, int hot_x,
00176 int hot_y);
00177
00185 extern DECLSPEC void SDLCALL SDL_SetCursor(SDL_Cursor * cursor);
00186
00192 extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void);
00193
00201 extern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor * cursor);
00202
00212 extern DECLSPEC int SDLCALL SDL_ShowCursor(int toggle);
00213
00214
00215
00216
00217
00218
00219
00233 extern DECLSPEC int SDLCALL SDL_GetCursorsNumber(int index);
00234
00249 extern DECLSPEC int SDLCALL SDL_GetCurrentCursor(int index);
00250
00251 #define SDL_BUTTON(X) (1 << ((X)-1))
00252 #define SDL_BUTTON_LEFT 1
00253 #define SDL_BUTTON_MIDDLE 2
00254 #define SDL_BUTTON_RIGHT 3
00255 #define SDL_BUTTON_X1 4
00256 #define SDL_BUTTON_X2 5
00257 #define SDL_BUTTON_LMASK SDL_BUTTON(SDL_BUTTON_LEFT)
00258 #define SDL_BUTTON_MMASK SDL_BUTTON(SDL_BUTTON_MIDDLE)
00259 #define SDL_BUTTON_RMASK SDL_BUTTON(SDL_BUTTON_RIGHT)
00260 #define SDL_BUTTON_X1MASK SDL_BUTTON(SDL_BUTTON_X1)
00261 #define SDL_BUTTON_X2MASK SDL_BUTTON(SDL_BUTTON_X2)
00262
00263
00264
00265 #ifdef __cplusplus
00266
00267 }
00268
00269 #endif
00270 #include "close_code.h"
00271
00272 #endif
00273
00274