# Documentación de la biblioteca MLV-1.2.1

- Presentación
- Descargar
- Instalación
- Compilatción
- Ejemplos
- API
- Lista de las subrutinas
- bugs
- FAQ
- Contactos

MLV_mouse.h
1 /*
2 * This file is part of the MLV Library.
3 *
4 * Copyright (C) 2010,2011,2012 Adrien Boussicault, Marc Zipstein
5 *
6 *
7 * This Library is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This Library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this Library. If not, see <http://www.gnu.org/licenses/>.
19 */
20
32 #ifndef __MLV__MLV_MOUSE_H__
33 #define __MLV__MLV_MOUSE_H__
34
35 #ifndef MEMORY_DEBUG
36 #include <SDL/SDL.h>
37 #else
38 #include "memory_debug.h"
39 #endif
40
41 #include "MLV_device_with_buttons.h"
42
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46
51 typedef enum{
52 MLV_BUTTON_LEFT = SDL_BUTTON_LEFT,
53 MLV_BUTTON_MIDDLE = SDL_BUTTON_MIDDLE,
54 MLV_BUTTON_RIGHT = SDL_BUTTON_RIGHT
55 } MLV_Mouse_button;
56
68 void MLV_wait_mouse(int *x, int *y);
69
85 int MLV_wait_mouse_or_seconds(int *x, int *y, int seconds);
86
95 const char* MLV_convert_mouse_button_to_string( MLV_Mouse_button button_code );
96
103 MLV_Mouse_button MLV_convert_string_to_mouse_button( const char* button_string );
104
112 void MLV_get_mouse_position( int* x, int* y );
113
121 MLV_Button_state MLV_get_mouse_button_state( MLV_Mouse_button mouse_button );
122
123 #ifdef __cplusplus
124 }
125 #endif
126
127 #endif