Mouse.h
Go to the documentation of this file.
1 //
3 // SFML - Simple and Fast Multimedia Library
4 // Copyright (C) 2007-2013 Laurent Gomila (laurent.gom@gmail.com)//
5 // This software is provided 'as-is', without any express or implied warranty.
6 // In no event will the authors be held liable for any damages arising from the use of this software.
7 //
8 // Permission is granted to anyone to use this software for any purpose,
9 // including commercial applications, and to alter it and redistribute it freely,
10 // subject to the following restrictions:
11 //
12 // 1. The origin of this software must not be misrepresented;
13 // you must not claim that you wrote the original software.
14 // If you use this software in a product, an acknowledgment
15 // in the product documentation would be appreciated but is not required.
16 //
17 // 2. Altered source versions must be plainly marked as such,
18 // and must not be misrepresented as being the original software.
19 //
20 // 3. This notice may not be removed or altered from any source distribution.
21 //
23 
24 #ifndef SFML_MOUSE_H
25 #define SFML_MOUSE_H
26 
28 // Headers
30 #include <SFML/Window/Export.h>
31 #include <SFML/Window/Types.h>
32 #include <SFML/System/Vector2.h>
33 
34 
39 typedef enum
40 {
46 
49 
50 
60 
73 
84 CSFML_WINDOW_API void sfMouse_setPosition(sfVector2i position, const sfWindow* relativeTo);
85 
86 
87 #endif // SFML_MOUSE_H
Keep last – the total number of mouse buttons.
Definition: Mouse.h:47
struct sfWindow sfWindow
Definition: Window/Types.h:30
The left mouse button.
Definition: Mouse.h:41
int sfBool
Definition: Config.h:106
#define CSFML_WINDOW_API
Definition: Window/Export.h:43
2-component vector of integers
Definition: Vector2.h:38
The second extra mouse button.
Definition: Mouse.h:45
The middle (wheel) mouse button.
Definition: Mouse.h:43
CSFML_WINDOW_API void sfMouse_setPosition(sfVector2i position, const sfWindow *relativeTo)
Set the current position of the mouse.
CSFML_WINDOW_API sfVector2i sfMouse_getPosition(const sfWindow *relativeTo)
Get the current position of the mouse.
sfMouseButton
Mouse buttons.
Definition: Mouse.h:39
The first extra mouse button.
Definition: Mouse.h:44
The right mouse button.
Definition: Mouse.h:42
CSFML_WINDOW_API sfBool sfMouse_isButtonPressed(sfMouseButton button)
Check if a mouse button is pressed.