2
0

SDL_input.h 2.5 KB

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