zenilib: zenilib/jni/external/sdl/SDL/SDL_mouse.h Source File

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
SDL_mouse.h
Go to the documentation of this file.
1 /*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20 */
21
28 #ifndef _SDL_mouse_h
29 #define _SDL_mouse_h
30
31 #include "SDL_stdinc.h"
32 #include "SDL_error.h"
33 #include "SDL_video.h"
34
35 #include "begin_code.h"
36 /* Set up for C function definitions, even when using C++ */
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40
41 typedef struct SDL_Cursor SDL_Cursor; /* Implementation dependent */
42
46 typedef enum
47 {
48 SDL_SYSTEM_CURSOR_ARROW,
49 SDL_SYSTEM_CURSOR_IBEAM,
50 SDL_SYSTEM_CURSOR_WAIT,
51 SDL_SYSTEM_CURSOR_CROSSHAIR,
52 SDL_SYSTEM_CURSOR_WAITARROW,
53 SDL_SYSTEM_CURSOR_SIZENWSE,
54 SDL_SYSTEM_CURSOR_SIZENESW,
55 SDL_SYSTEM_CURSOR_SIZEWE,
56 SDL_SYSTEM_CURSOR_SIZENS,
57 SDL_SYSTEM_CURSOR_SIZEALL,
58 SDL_SYSTEM_CURSOR_NO,
59 SDL_SYSTEM_CURSOR_HAND,
60 SDL_NUM_SYSTEM_CURSORS
61 } SDL_SystemCursor;
62
63 /* Function prototypes */
64
68 extern DECLSPEC SDL_Window * SDLCALL SDL_GetMouseFocus(void);
69
78 extern DECLSPEC Uint32 SDLCALL SDL_GetMouseState(int *x, int *y);
79
87 extern DECLSPEC Uint32 SDLCALL SDL_GetRelativeMouseState(int *x, int *y);
88
98 extern DECLSPEC void SDLCALL SDL_WarpMouseInWindow(SDL_Window * window,
99 int x, int y);
100
117 extern DECLSPEC int SDLCALL SDL_SetRelativeMouseMode(SDL_bool enabled);
118
124 extern DECLSPEC SDL_bool SDLCALL SDL_GetRelativeMouseMode(void);
125
144 extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateCursor(const Uint8 * data,
145 const Uint8 * mask,
146 int w, int h, int hot_x,
147 int hot_y);
148
154 extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateColorCursor(SDL_Surface *surface,
155 int hot_x,
156 int hot_y);
157
163 extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateSystemCursor(SDL_SystemCursor id);
164
168 extern DECLSPEC void SDLCALL SDL_SetCursor(SDL_Cursor * cursor);
169
173 extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void);
174
178 extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetDefaultCursor(void);
179
185 extern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor * cursor);
186
195 extern DECLSPEC int SDLCALL SDL_ShowCursor(int toggle);
196
203 #define SDL_BUTTON(X) (1 << ((X)-1))
204 #define SDL_BUTTON_LEFT 1
205 #define SDL_BUTTON_MIDDLE 2
206 #define SDL_BUTTON_RIGHT 3
207 #define SDL_BUTTON_X1 4
208 #define SDL_BUTTON_X2 5
209 #define SDL_BUTTON_LMASK SDL_BUTTON(SDL_BUTTON_LEFT)
210 #define SDL_BUTTON_MMASK SDL_BUTTON(SDL_BUTTON_MIDDLE)
211 #define SDL_BUTTON_RMASK SDL_BUTTON(SDL_BUTTON_RIGHT)
212 #define SDL_BUTTON_X1MASK SDL_BUTTON(SDL_BUTTON_X1)
213 #define SDL_BUTTON_X2MASK SDL_BUTTON(SDL_BUTTON_X2)
214
215
216 /* Ends C function definitions when using C++ */
217 #ifdef __cplusplus
218 }
219 #endif
220 #include "close_code.h"
221
222 #endif /* _SDL_mouse_h */
223
224 /* vi: set ts=4 sw=4 expandtab: */
SDL_FreeCursor
DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor *cursor)
Frees a cursor created with SDL_CreateCursor().
Definition: SDL_mouse.c:664
SDL_CreateCursor
DECLSPEC SDL_Cursor *SDLCALL SDL_CreateCursor(const Uint8 *data, const Uint8 *mask, int w, int h, int hot_x, int hot_y)
Create a cursor, using the specified bitmap data and mask (in MSB format).
Definition: SDL_mouse.c:486
SDL_SYSTEM_CURSOR_ARROW
Definition: SDL_mouse.h:48
h
GLfloat GLfloat GLfloat GLfloat h
Definition: glew.h:7294
SDL_CreateColorCursor
DECLSPEC SDL_Cursor *SDLCALL SDL_CreateColorCursor(SDL_Surface *surface, int hot_x, int hot_y)
Create a color cursor.
Definition: SDL_mouse.c:535
SDL_SYSTEM_CURSOR_HAND
Definition: SDL_mouse.h:59
SDL_ShowCursor
DECLSPEC int SDLCALL SDL_ShowCursor(int toggle)
Toggle whether or not the cursor is shown.
Definition: SDL_mouse.c:698
SDL_bool
SDL_bool
Definition: SDL_stdinc.h:116
enabled
GLenum GLsizei const GLuint GLboolean enabled
Definition: glew.h:2538
SDL_GetMouseFocus
DECLSPEC SDL_Window *SDLCALL SDL_GetMouseFocus(void)
Get the window which currently has mouse focus.
Definition: SDL_mouse.c:68
x
EGLSurface EGLint x
Definition: eglext.h:293
surface
EGLSurface surface
Definition: eglext.h:74
SDL_Surface
A collection of pixels used in software blitting.
Definition: SDL_surface.h:69
SDL_Cursor
Definition: SDL_mouse_c.h:30
DECLSPEC
#define DECLSPEC
Definition: begin_code.h:62
SDLCALL
#define SDLCALL
Definition: begin_code.h:72
begin_code.h
SDL_SYSTEM_CURSOR_SIZEALL
Definition: SDL_mouse.h:57
SDL_GetRelativeMouseState
DECLSPEC Uint32 SDLCALL SDL_GetRelativeMouseState(int *x, int *y)
Retrieve the relative state of the mouse.
Definition: SDL_mouse.c:396
SDL_SYSTEM_CURSOR_SIZEWE
Definition: SDL_mouse.h:55
Uint32
uint32_t Uint32
An unsigned 32-bit integer type.
Definition: SDL_stdinc.h:145
SDL_GetMouseState
DECLSPEC Uint32 SDLCALL SDL_GetMouseState(int *x, int *y)
Retrieve the current state of the mouse.
Definition: SDL_mouse.c:382
SDL_video.h
close_code.h
data
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl2ext.h:848
SDL_GetDefaultCursor
DECLSPEC SDL_Cursor *SDLCALL SDL_GetDefaultCursor(void)
Return the default cursor.
Definition: SDL_mouse.c:653
SDL_SYSTEM_CURSOR_SIZENWSE
Definition: SDL_mouse.h:53
SDL_SetCursor
DECLSPEC void SDLCALL SDL_SetCursor(SDL_Cursor *cursor)
Set the active cursor.
Definition: SDL_mouse.c:602
SDL_stdinc.h
SDL_SystemCursor
SDL_SystemCursor
Cursor types for SDL_CreateSystemCursor.
Definition: SDL_mouse.h:46
SDL_SetRelativeMouseMode
DECLSPEC int SDLCALL SDL_SetRelativeMouseMode(SDL_bool enabled)
Set relative mouse mode.
Definition: SDL_mouse.c:430
SDL_SYSTEM_CURSOR_CROSSHAIR
Definition: SDL_mouse.h:51
y
EGLSurface EGLint EGLint y
Definition: eglext.h:293
SDL_GetRelativeMouseMode
DECLSPEC SDL_bool SDLCALL SDL_GetRelativeMouseMode(void)
Query whether relative mouse mode is enabled.
Definition: SDL_mouse.c:478
SDL_WarpMouseInWindow
DECLSPEC void SDLCALL SDL_WarpMouseInWindow(SDL_Window *window, int x, int y)
Moves the mouse to the given position within the window.
Definition: SDL_mouse.c:412
SDL_SYSTEM_CURSOR_WAIT
Definition: SDL_mouse.h:50
SDL_NUM_SYSTEM_CURSORS
Definition: SDL_mouse.h:60
Uint8
uint8_t Uint8
An unsigned 8-bit integer type.
Definition: SDL_stdinc.h:129
SDL_Window
Definition: SDL_sysvideo.h:71
SDL_SYSTEM_CURSOR_IBEAM
Definition: SDL_mouse.h:49
mask
GLint GLint GLint GLint GLint GLint GLint GLbitfield mask
Definition: gl2ext.h:961
SDL_SYSTEM_CURSOR_SIZENESW
Definition: SDL_mouse.h:54
SDL_GetCursor
DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void)
Return the active cursor.
Definition: SDL_mouse.c:642
w
GLint GLint GLint GLint GLint w
Definition: gl2ext.h:1215
SDL_SYSTEM_CURSOR_NO
Definition: SDL_mouse.h:58
SDL_SYSTEM_CURSOR_SIZENS
Definition: SDL_mouse.h:56
SDL_CreateSystemCursor
DECLSPEC SDL_Cursor *SDLCALL SDL_CreateSystemCursor(SDL_SystemCursor id)
Create a system cursor.
Definition: SDL_mouse.c:578
SDL_SYSTEM_CURSOR_WAITARROW
Definition: SDL_mouse.h:52
SDL_error.h