Mercurial > sdl-ios-xcode
comparison include/SDL_mouse.h @ 1673:624e1412fbba SDL-1.3
Keyboard code update in progress
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 10 Jun 2006 09:11:59 +0000 |
parents | 89f7510fe17a |
children | 5daa04d862f1 |
comparison
equal
deleted
inserted
replaced
1672:8e754b82cecc | 1673:624e1412fbba |
---|---|
43 | 43 |
44 typedef struct SDL_Cursor SDL_Cursor; /* Implementation dependent */ | 44 typedef struct SDL_Cursor SDL_Cursor; /* Implementation dependent */ |
45 | 45 |
46 /* Function prototypes */ | 46 /* Function prototypes */ |
47 | 47 |
48 /* \fn int SDL_GetNumMice(void) | 48 /** |
49 * \fn int SDL_GetNumMice(void) | |
49 * | 50 * |
50 * \brief Get the number of mouse input devices available. | 51 * \brief Get the number of mouse input devices available. |
51 * | 52 * |
52 * \sa SDL_SelectMouse() | 53 * \sa SDL_SelectMouse() |
53 */ | 54 */ |
54 extern DECLSPEC int SDLCALL SDL_GetNumMice(void); | 55 extern DECLSPEC int SDLCALL SDL_GetNumMice(void); |
55 | 56 |
56 /* \fn int SDL_SelectMouse(int index) | 57 /** |
58 * \fn int SDL_SelectMouse(int index) | |
57 * | 59 * |
58 * \brief Set the index of the currently selected mouse. | 60 * \brief Set the index of the currently selected mouse. |
59 * | 61 * |
60 * \return The index of the previously selected mouse. | 62 * \return The index of the previously selected mouse. |
61 * | 63 * |
63 * | 65 * |
64 * \sa SDL_GetNumMice() | 66 * \sa SDL_GetNumMice() |
65 */ | 67 */ |
66 extern DECLSPEC int SDLCALL SDL_SelectMouse(int index); | 68 extern DECLSPEC int SDLCALL SDL_SelectMouse(int index); |
67 | 69 |
68 /* \fn SDL_WindowID SDL_GetMouseFocusWindow(void) | 70 /** |
71 * \fn SDL_WindowID SDL_GetMouseFocusWindow(void) | |
69 * | 72 * |
70 * \brief Get the window which currently has focus for the currently selected mouse. | 73 * \brief Get the window which currently has focus for the currently selected mouse. |
71 */ | 74 */ |
72 extern DECLSPEC SDL_WindowID SDLCALL SDL_GetMouseFocusWindow(void); | 75 extern DECLSPEC SDL_WindowID SDLCALL SDL_GetMouseFocusWindow(void); |
73 | 76 |
74 /* | 77 /** |
75 * \fn Uint8 SDL_GetMouseState(int *x, int *y) | 78 * \fn Uint8 SDL_GetMouseState(int *x, int *y) |
76 * | 79 * |
77 * \brief Retrieve the current state of the mouse. | 80 * \brief Retrieve the current state of the mouse. |
78 * | 81 * |
79 * The current button state is returned as a button bitmask, which can | 82 * The current button state is returned as a button bitmask, which can |
81 * mouse cursor position relative to the focus window for the currently | 84 * mouse cursor position relative to the focus window for the currently |
82 * selected mouse. You can pass NULL for either x or y. | 85 * selected mouse. You can pass NULL for either x or y. |
83 */ | 86 */ |
84 extern DECLSPEC Uint8 SDLCALL SDL_GetMouseState(int *x, int *y); | 87 extern DECLSPEC Uint8 SDLCALL SDL_GetMouseState(int *x, int *y); |
85 | 88 |
86 /* | 89 /** |
87 * \fn Uint8 SDL_GetRelativeMouseState(int *x, int *y) | 90 * \fn Uint8 SDL_GetRelativeMouseState(int *x, int *y) |
88 * | 91 * |
89 * \brief Retrieve the current state of the mouse. | 92 * \brief Retrieve the current state of the mouse. |
90 * | 93 * |
91 * The current button state is returned as a button bitmask, which can | 94 * The current button state is returned as a button bitmask, which can |
92 * be tested using the SDL_BUTTON(X) macros, and x and y are set to the | 95 * be tested using the SDL_BUTTON(X) macros, and x and y are set to the |
93 * mouse deltas since the last call to SDL_GetRelativeMouseState(). | 96 * mouse deltas since the last call to SDL_GetRelativeMouseState(). |
94 */ | 97 */ |
95 extern DECLSPEC Uint8 SDLCALL SDL_GetRelativeMouseState(int *x, int *y); | 98 extern DECLSPEC Uint8 SDLCALL SDL_GetRelativeMouseState(int *x, int *y); |
96 | 99 |
97 /* | 100 /** |
98 * \fn void SDL_WarpMouseInWindow(SDL_WindowID windowID, int x, int y) | 101 * \fn void SDL_WarpMouseInWindow(SDL_WindowID windowID, int x, int y) |
99 * | 102 * |
100 * \brief Moves the currently selected mouse to the given position within the window. | 103 * \brief Moves the currently selected mouse to the given position within the window. |
101 * | 104 * |
102 * \param windowID The window to move the mouse into, or 0 for the current mouse focus | 105 * \param windowID The window to move the mouse into, or 0 for the current mouse focus |
106 * \note This function generates a mouse motion event | 109 * \note This function generates a mouse motion event |
107 */ | 110 */ |
108 extern DECLSPEC void SDLCALL SDL_WarpMouseInWindow(SDL_WindowID windowID, | 111 extern DECLSPEC void SDLCALL SDL_WarpMouseInWindow(SDL_WindowID windowID, |
109 int x, int y); | 112 int x, int y); |
110 | 113 |
111 /* | 114 /** |
112 * \fn SDL_Cursor *SDL_CreateCursor (const Uint8 * data, const Uint8 * mask, int w, int h, int hot_x, int hot_y) | 115 * \fn SDL_Cursor *SDL_CreateCursor (const Uint8 * data, const Uint8 * mask, int w, int h, int hot_x, int hot_y) |
113 * | 116 * |
114 * \brief Create a cursor for the currently selected mouse, using the | 117 * \brief Create a cursor for the currently selected mouse, using the |
115 * specified bitmap data and mask (in MSB format). | 118 * specified bitmap data and mask (in MSB format). |
116 * | 119 * |
128 extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateCursor(const Uint8 * data, | 131 extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateCursor(const Uint8 * data, |
129 const Uint8 * mask, | 132 const Uint8 * mask, |
130 int w, int h, int hot_x, | 133 int w, int h, int hot_x, |
131 int hot_y); | 134 int hot_y); |
132 | 135 |
133 /* | 136 /** |
134 * \fn void SDL_SetCursor(SDL_Cursor * cursor) | 137 * \fn void SDL_SetCursor(SDL_Cursor * cursor) |
135 * | 138 * |
136 * \brief Set the active cursor for the currently selected mouse. | 139 * \brief Set the active cursor for the currently selected mouse. |
137 * | 140 * |
138 * \note The cursor must have been created for the selected mouse. | 141 * \note The cursor must have been created for the selected mouse. |
139 */ | 142 */ |
140 extern DECLSPEC void SDLCALL SDL_SetCursor(SDL_Cursor * cursor); | 143 extern DECLSPEC void SDLCALL SDL_SetCursor(SDL_Cursor * cursor); |
141 | 144 |
142 /* | 145 /** |
143 * \fn SDL_Cursor *SDL_GetCursor(void) | 146 * \fn SDL_Cursor *SDL_GetCursor(void) |
144 * | 147 * |
145 * \brief Return the active cursor for the currently selected mouse. | 148 * \brief Return the active cursor for the currently selected mouse. |
146 */ | 149 */ |
147 extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void); | 150 extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void); |
148 | 151 |
149 /* | 152 /** |
150 * \fn void SDL_FreeCursor(SDL_Cursor * cursor) | 153 * \fn void SDL_FreeCursor(SDL_Cursor * cursor) |
151 * | 154 * |
152 * \brief Frees a cursor created with SDL_CreateCursor(). | 155 * \brief Frees a cursor created with SDL_CreateCursor(). |
153 * | 156 * |
154 * \sa SDL_CreateCursor() | 157 * \sa SDL_CreateCursor() |
155 */ | 158 */ |
156 extern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor * cursor); | 159 extern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor * cursor); |
157 | 160 |
158 /* | 161 /** |
159 * \fn int SDL_ShowCursor(int toggle) | 162 * \fn int SDL_ShowCursor(int toggle) |
160 * | 163 * |
161 * \brief Toggle whether or not the cursor is shown for the currently selected mouse. | 164 * \brief Toggle whether or not the cursor is shown for the currently selected mouse. |
162 * | 165 * |
163 * \param toggle 1 to show the cursor, 0 to hide it, -1 to query the current state. | 166 * \param toggle 1 to show the cursor, 0 to hide it, -1 to query the current state. |