00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00027 #ifndef _SDL_mouse_h
00028 #define _SDL_mouse_h
00029
00030 #include "SDL_stdinc.h"
00031 #include "SDL_error.h"
00032 #include "SDL_video.h"
00033
00034 #include "begin_code.h"
00035
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039
00040 typedef struct WMcursor WMcursor;
00041 typedef struct SDL_Cursor {
00042 SDL_Rect area;
00043 Sint16 hot_x, hot_y;
00044 Uint8 *data;
00045 Uint8 *mask;
00046 Uint8 *save[2];
00047 WMcursor *wm_cursor;
00048 } SDL_Cursor;
00049
00050
00057 extern DECLSPEC Uint8 SDLCALL SDL_GetMouseState(int *x, int *y);
00058
00065 extern DECLSPEC Uint8 SDLCALL SDL_GetRelativeMouseState(int *x, int *y);
00066
00070 extern DECLSPEC void SDLCALL SDL_WarpMouse(Uint16 x, Uint16 y);
00071
00085 extern DECLSPEC SDL_Cursor * SDLCALL SDL_CreateCursor
00086 (Uint8 *data, Uint8 *mask, int w, int h, int hot_x, int hot_y);
00087
00093 extern DECLSPEC void SDLCALL SDL_SetCursor(SDL_Cursor *cursor);
00094
00098 extern DECLSPEC SDL_Cursor * SDLCALL SDL_GetCursor(void);
00099
00103 extern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor *cursor);
00104
00112 extern DECLSPEC int SDLCALL SDL_ShowCursor(int toggle);
00113
00122 #define SDL_BUTTON(X) (1 << ((X)-1))
00123 #define SDL_BUTTON_LEFT 1
00124 #define SDL_BUTTON_MIDDLE 2
00125 #define SDL_BUTTON_RIGHT 3
00126 #define SDL_BUTTON_WHEELUP 4
00127 #define SDL_BUTTON_WHEELDOWN 5
00128 #define SDL_BUTTON_X1 6
00129 #define SDL_BUTTON_X2 7
00130 #define SDL_BUTTON_LMASK SDL_BUTTON(SDL_BUTTON_LEFT)
00131 #define SDL_BUTTON_MMASK SDL_BUTTON(SDL_BUTTON_MIDDLE)
00132 #define SDL_BUTTON_RMASK SDL_BUTTON(SDL_BUTTON_RIGHT)
00133 #define SDL_BUTTON_X1MASK SDL_BUTTON(SDL_BUTTON_X1)
00134 #define SDL_BUTTON_X2MASK SDL_BUTTON(SDL_BUTTON_X2)
00135
00137
00138 #ifdef __cplusplus
00139 }
00140 #endif
00141 #include "close_code.h"
00142
00143 #endif