comparison include/SDL_input.h @ 4465:3e69e077cb95

Removed multi-mouse / multi-keyboard support in anticipation of a real multi-mouse and multi-touch API. Plus, this lets me start implementing cursor support.
author Sam Lantinga <slouken@libsdl.org>
date Sun, 09 May 2010 20:47:22 -0700
parents
children b530ef003506
comparison
equal deleted inserted replaced
4464:fa77a6429698 4465:3e69e077cb95
1 /*
2 SDL - Simple DirectMedia Layer
3 Copyright (C) 1997-2010 Sam Lantinga
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
19 Sam Lantinga
20 slouken@libsdl.org
21 */
22
23 /**
24 * \file SDL_input.h
25 *
26 * Include file for lowlevel SDL input device handling.
27 *
28 * This talks about individual devices, and not the system cursor. If you
29 * just want to know when the user moves the pointer somewhere in your
30 * window, this is NOT the API you want. This one handles things like
31 * multi-touch, drawing tablets, and multiple, separate mice.
32 *
33 * The other API is in SDL_mouse.h
34 */
35
36 #ifndef _SDL_input_h
37 #define _SDL_input_h
38
39 #include "SDL_stdinc.h"
40 #include "SDL_error.h"
41 #include "SDL_video.h"
42
43 #include "begin_code.h"
44 /* Set up for C function definitions, even when using C++ */
45 #ifdef __cplusplus
46 /* *INDENT-OFF* */
47 extern "C" {
48 /* *INDENT-ON* */
49 #endif
50
51
52 /* Function prototypes */
53
54 /* !!! FIXME: real documentation
55 * - Redetect devices
56 * - This invalidates all existing device information from previous queries!
57 * - There is an implicit (re)detect upon SDL_Init().
58 */
59 extern DECLSPEC int SDLCALL SDL_RedetectInputDevices(void);
60
61 /**
62 * \brief Get the number of mouse input devices available.
63 */
64 extern DECLSPEC int SDLCALL SDL_GetNumInputDevices(void);
65
66 /**
67 * \brief Gets the name of a device with the given index.
68 *
69 * \param index is the index of the device, whose name is to be returned.
70 *
71 * \return the name of the device with the specified index
72 */
73 extern DECLSPEC const char *SDLCALL SDL_GetInputDeviceName(int index);
74
75
76 extern DECLSPEC int SDLCALL SDL_IsDeviceDisconnected(int index);
77
78 /* Ends C function definitions when using C++ */
79 #ifdef __cplusplus
80 /* *INDENT-OFF* */
81 }
82 /* *INDENT-ON* */
83 #endif
84 #include "close_code.h"
85
86 #endif /* _SDL_mouse_h */
87
88 /* vi: set ts=4 sw=4 expandtab: */