1 
2 #ifndef _SDL_mouse_h
3 #define _SDL_mouse_h
4 
5 #include "SDL_stdinc.h"
6 #include "SDL_error.h"
7 #include "SDL_video.h"
8 
9 #include "begin_code.h"
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 typedef struct SDL_Cursor SDL_Cursor;
16 
17 typedef enum
18 {
19     SDL_SYSTEM_CURSOR_ARROW,
20     SDL_SYSTEM_CURSOR_IBEAM,
21     SDL_SYSTEM_CURSOR_WAIT,
22     SDL_SYSTEM_CURSOR_CROSSHAIR,
23     SDL_SYSTEM_CURSOR_WAITARROW,
24     SDL_SYSTEM_CURSOR_SIZENWSE,
25     SDL_SYSTEM_CURSOR_SIZENESW,
26     SDL_SYSTEM_CURSOR_SIZEWE,
27     SDL_SYSTEM_CURSOR_SIZENS,
28     SDL_SYSTEM_CURSOR_SIZEALL,
29     SDL_SYSTEM_CURSOR_NO,
30     SDL_SYSTEM_CURSOR_HAND,
31     SDL_NUM_SYSTEM_CURSORS
32 } SDL_SystemCursor;
33 
34 typedef SDL_Window * SDLCALL tSDL_GetMouseFocus(void);
35 
36 typedef Uint32 SDLCALL tSDL_GetMouseState(int *x, int *y);
37 
38 typedef Uint32 SDLCALL tSDL_GetRelativeMouseState(int *x, int *y);
39 
40 typedef void SDLCALL tSDL_WarpMouseInWindow(SDL_Window * window,
41                                                    int x, int y);
42 
43 typedef int SDLCALL tSDL_SetRelativeMouseMode(SDL_bool enabled);
44 
45 typedef SDL_bool SDLCALL tSDL_GetRelativeMouseMode(void);
46 
47 typedef SDL_Cursor * SDLCALL tSDL_CreateCursor(const Uint8 * data,
48                                                      const Uint8 * mask,
49                                                      int w, int h, int hot_x,
50                                                      int hot_y);
51 
52 typedef SDL_Cursor * SDLCALL tSDL_CreateColorCursor(SDL_Surface *surface,
53                                                           int hot_x,
54                                                           int hot_y);
55 
56 typedef SDL_Cursor * SDLCALL tSDL_CreateSystemCursor(SDL_SystemCursor id);
57 
58 typedef void SDLCALL tSDL_SetCursor(SDL_Cursor * cursor);
59 
60 typedef SDL_Cursor * SDLCALL tSDL_GetCursor(void);
61 
62 typedef SDL_Cursor * SDLCALL tSDL_GetDefaultCursor(void);
63 
64 typedef void SDLCALL tSDL_FreeCursor(SDL_Cursor * cursor);
65 
66 typedef int SDLCALL tSDL_ShowCursor(int toggle);
67 
68 #define SDL_BUTTON(X)       (1 << ((X)-1))
69 #define SDL_BUTTON_LEFT     1
70 #define SDL_BUTTON_MIDDLE   2
71 #define SDL_BUTTON_RIGHT    3
72 #define SDL_BUTTON_X1       4
73 #define SDL_BUTTON_X2       5
74 #define SDL_BUTTON_LMASK    SDL_BUTTON(SDL_BUTTON_LEFT)
75 #define SDL_BUTTON_MMASK    SDL_BUTTON(SDL_BUTTON_MIDDLE)
76 #define SDL_BUTTON_RMASK    SDL_BUTTON(SDL_BUTTON_RIGHT)
77 #define SDL_BUTTON_X1MASK   SDL_BUTTON(SDL_BUTTON_X1)
78 #define SDL_BUTTON_X2MASK   SDL_BUTTON(SDL_BUTTON_X2)
79 
80 extern tSDL_GetMouseFocus *SDL_GetMouseFocus;
81 extern tSDL_GetMouseState *SDL_GetMouseState;
82 extern tSDL_GetRelativeMouseState *SDL_GetRelativeMouseState;
83 extern tSDL_WarpMouseInWindow *SDL_WarpMouseInWindow;
84 extern tSDL_SetRelativeMouseMode *SDL_SetRelativeMouseMode;
85 extern tSDL_GetRelativeMouseMode *SDL_GetRelativeMouseMode;
86 extern tSDL_CreateCursor *SDL_CreateCursor;
87 extern tSDL_CreateColorCursor *SDL_CreateColorCursor;
88 extern tSDL_CreateSystemCursor *SDL_CreateSystemCursor;
89 extern tSDL_SetCursor *SDL_SetCursor;
90 extern tSDL_GetCursor *SDL_GetCursor;
91 extern tSDL_GetDefaultCursor *SDL_GetDefaultCursor;
92 extern tSDL_FreeCursor *SDL_FreeCursor;
93 extern tSDL_ShowCursor *SDL_ShowCursor;
94 
95 #ifdef __cplusplus
96 }
97 #endif
98 #include "close_code.h"
99 
100 #endif
101 
102