zenilib: zenilib/jni/external/sdl/src/events/SDL_mouse_c.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_c.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 #include "SDL_config.h"
22
23 #ifndef _SDL_mouse_c_h
24 #define _SDL_mouse_c_h
25
26 #include "SDL_mouse.h"
27
28 typedef Uint32 SDL_MouseID;
29
30 struct SDL_Cursor
31 {
32 struct SDL_Cursor *next;
33 void *driverdata;
34 };
35
36 typedef struct
37 {
38 /* Create a cursor from a surface */
39 SDL_Cursor *(*CreateCursor) (SDL_Surface * surface, int hot_x, int hot_y);
40
41 /* Create a system cursor */
42 SDL_Cursor *(*CreateSystemCursor) (SDL_SystemCursor id);
43
44 /* Show the specified cursor, or hide if cursor is NULL */
45 int (*ShowCursor) (SDL_Cursor * cursor);
46
47 /* This is called when a mouse motion event occurs */
48 void (*MoveCursor) (SDL_Cursor * cursor);
49
50 /* Free a window manager cursor */
51 void (*FreeCursor) (SDL_Cursor * cursor);
52
53 /* Warp the mouse to (x,y) */
54 void (*WarpMouse) (SDL_Window * window, int x, int y);
55
56 /* Set relative mode */
57 int (*SetRelativeMouseMode) (SDL_bool enabled);
58
59 /* Data common to all mice */
60 SDL_MouseID mouseID;
61 SDL_Window *focus;
62 int x;
63 int y;
64 int xdelta;
65 int ydelta;
66 int last_x, last_y; /* the last reported x and y coordinates */
67 Uint32 buttonstate;
68 SDL_bool relative_mode;
69 /* the x and y coordinates when relative mode was activated */
70 int original_x, original_y;
71
72 SDL_Cursor *cursors;
73 SDL_Cursor *def_cursor;
74 SDL_Cursor *cur_cursor;
75 SDL_bool cursor_shown;
76
77 /* Driver-dependent data. */
78 void *driverdata;
79 } SDL_Mouse;
80
81
82 /* Initialize the mouse subsystem */
83 extern int SDL_MouseInit(void);
84
85 /* Get the mouse state structure */
86 SDL_Mouse *SDL_GetMouse(void);
87
88 /* Set the default mouse cursor */
89 extern void SDL_SetDefaultCursor(SDL_Cursor * cursor);
90
91 /* Set the mouse focus window */
92 extern void SDL_SetMouseFocus(SDL_Window * window);
93
94 /* Send a mouse motion event */
95 extern int SDL_SendMouseMotion(SDL_Window * window, SDL_MouseID mouseID, int relative, int x, int y);
96
97 /* Send a mouse button event */
98 extern int SDL_SendMouseButton(SDL_Window * window, SDL_MouseID mouseID, Uint8 state, Uint8 button);
99
100 /* Send a mouse wheel event */
101 extern int SDL_SendMouseWheel(SDL_Window * window, SDL_MouseID mouseID, int x, int y);
102
103 /* Shutdown the mouse subsystem */
104 extern void SDL_MouseQuit(void);
105
106 #endif /* _SDL_mouse_c_h */
107
108 /* vi: set ts=4 sw=4 expandtab: */
SDL_Mouse::y
int y
Definition: SDL_mouse_c.h:63
SDL_GetMouse
SDL_Mouse * SDL_GetMouse(void)
Definition: SDL_mouse.c:62
SDL_Mouse::last_y
int last_y
Definition: SDL_mouse_c.h:66
void
GLvoid **typedef void(GLAPIENTRY *PFNGLGETVERTEXATTRIBDVPROC)(GLuint
Definition: glew.h:1824
SDL_Mouse::buttonstate
Uint32 buttonstate
Definition: SDL_mouse_c.h:67
SDL_Mouse::focus
SDL_Window * focus
Definition: SDL_mouse_c.h:61
SDL_bool
SDL_bool
Definition: SDL_stdinc.h:116
enabled
GLenum GLsizei const GLuint GLboolean enabled
Definition: glew.h:2538
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
SDL_Mouse::ydelta
int ydelta
Definition: SDL_mouse_c.h:65
SDL_SetMouseFocus
void SDL_SetMouseFocus(SDL_Window *window)
Definition: SDL_mouse.c:93
id
GLuint id
Definition: gl2ext.h:1142
SDL_MouseQuit
void SDL_MouseQuit(void)
Definition: SDL_mouse.c:360
SDL_config.h
SDL_Mouse::cursors
SDL_Cursor * cursors
Definition: SDL_mouse_c.h:72
SDL_Mouse::mouseID
SDL_MouseID mouseID
Definition: SDL_mouse_c.h:60
SDL_MouseID
Uint32 SDL_MouseID
Definition: SDL_mouse_c.h:28
SDL_MouseInit
int SDL_MouseInit(void)
Definition: SDL_mouse.c:41
Uint32
uint32_t Uint32
An unsigned 32-bit integer type.
Definition: SDL_stdinc.h:145
int
int
Definition: SDL_systhread.c:37
SDL_SendMouseMotion
int SDL_SendMouseMotion(SDL_Window *window, SDL_MouseID mouseID, int relative, int x, int y)
Definition: SDL_mouse.c:178
SDL_mouse.h
SDL_Mouse::cursor_shown
SDL_bool cursor_shown
Definition: SDL_mouse_c.h:75
SDL_Mouse::relative_mode
SDL_bool relative_mode
Definition: SDL_mouse_c.h:68
SDL_SystemCursor
SDL_SystemCursor
Cursor types for SDL_CreateSystemCursor.
Definition: SDL_mouse.h:46
SDL_SetDefaultCursor
void SDL_SetDefaultCursor(SDL_Cursor *cursor)
Definition: SDL_mouse.c:51
SDL_Mouse::x
int x
Definition: SDL_mouse_c.h:62
y
EGLSurface EGLint EGLint y
Definition: eglext.h:293
SDL_Cursor::next
struct SDL_Cursor * next
Definition: SDL_mouse_c.h:32
SDL_Mouse::xdelta
int xdelta
Definition: SDL_mouse_c.h:64
Uint8
uint8_t Uint8
An unsigned 8-bit integer type.
Definition: SDL_stdinc.h:129
SDL_Window
Definition: SDL_sysvideo.h:71
SDL_SendMouseWheel
int SDL_SendMouseWheel(SDL_Window *window, SDL_MouseID mouseID, int x, int y)
Definition: SDL_mouse.c:332
SDL_Mouse
Definition: SDL_mouse_c.h:36
SDL_Mouse::cur_cursor
SDL_Cursor * cur_cursor
Definition: SDL_mouse_c.h:74
SDL_Mouse::driverdata
void * driverdata
Definition: SDL_mouse_c.h:78
SDL_Mouse::original_y
int original_y
Definition: SDL_mouse_c.h:70
SDL_Cursor::driverdata
void * driverdata
Definition: SDL_mouse_c.h:33
SDL_SendMouseButton
int SDL_SendMouseButton(SDL_Window *window, SDL_MouseID mouseID, Uint8 state, Uint8 button)
Definition: SDL_mouse.c:276
SDL_Mouse::def_cursor
SDL_Cursor * def_cursor
Definition: SDL_mouse_c.h:73