include/SDL_input.h
changeset 4465 3e69e077cb95
child 5262 b530ef003506
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/include/SDL_input.h	Sun May 09 20:47:22 2010 -0700
     1.3 @@ -0,0 +1,88 @@
     1.4 +/*
     1.5 +    SDL - Simple DirectMedia Layer
     1.6 +    Copyright (C) 1997-2010 Sam Lantinga
     1.7 +
     1.8 +    This library is free software; you can redistribute it and/or
     1.9 +    modify it under the terms of the GNU Lesser General Public
    1.10 +    License as published by the Free Software Foundation; either
    1.11 +    version 2.1 of the License, or (at your option) any later version.
    1.12 +
    1.13 +    This library is distributed in the hope that it will be useful,
    1.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    1.16 +    Lesser General Public License for more details.
    1.17 +
    1.18 +    You should have received a copy of the GNU Lesser General Public
    1.19 +    License along with this library; if not, write to the Free Software
    1.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    1.21 +
    1.22 +    Sam Lantinga
    1.23 +    slouken@libsdl.org
    1.24 +*/
    1.25 +
    1.26 +/**
    1.27 + *  \file SDL_input.h
    1.28 + *  
    1.29 + *  Include file for lowlevel SDL input device handling.
    1.30 + *
    1.31 + *  This talks about individual devices, and not the system cursor. If you
    1.32 + *  just want to know when the user moves the pointer somewhere in your
    1.33 + *  window, this is NOT the API you want. This one handles things like
    1.34 + *  multi-touch, drawing tablets, and multiple, separate mice.
    1.35 + *
    1.36 + *  The other API is in SDL_mouse.h
    1.37 + */
    1.38 +
    1.39 +#ifndef _SDL_input_h
    1.40 +#define _SDL_input_h
    1.41 +
    1.42 +#include "SDL_stdinc.h"
    1.43 +#include "SDL_error.h"
    1.44 +#include "SDL_video.h"
    1.45 +
    1.46 +#include "begin_code.h"
    1.47 +/* Set up for C function definitions, even when using C++ */
    1.48 +#ifdef __cplusplus
    1.49 +/* *INDENT-OFF* */
    1.50 +extern "C" {
    1.51 +/* *INDENT-ON* */
    1.52 +#endif
    1.53 +
    1.54 +
    1.55 +/* Function prototypes */
    1.56 +
    1.57 +/* !!! FIXME: real documentation
    1.58 + * - Redetect devices
    1.59 + * - This invalidates all existing device information from previous queries!
    1.60 + * - There is an implicit (re)detect upon SDL_Init().
    1.61 + */
    1.62 +extern DECLSPEC int SDLCALL SDL_RedetectInputDevices(void);
    1.63 +
    1.64 +/**
    1.65 + *  \brief Get the number of mouse input devices available.
    1.66 + */
    1.67 +extern DECLSPEC int SDLCALL SDL_GetNumInputDevices(void);
    1.68 +
    1.69 +/**
    1.70 + *  \brief Gets the name of a device with the given index.
    1.71 + *  
    1.72 + *  \param index is the index of the device, whose name is to be returned.
    1.73 + *  
    1.74 + *  \return the name of the device with the specified index
    1.75 + */
    1.76 +extern DECLSPEC const char *SDLCALL SDL_GetInputDeviceName(int index);
    1.77 +
    1.78 +
    1.79 +extern DECLSPEC int SDLCALL SDL_IsDeviceDisconnected(int index);
    1.80 +
    1.81 +/* Ends C function definitions when using C++ */
    1.82 +#ifdef __cplusplus
    1.83 +/* *INDENT-OFF* */
    1.84 +}
    1.85 +/* *INDENT-ON* */
    1.86 +#endif
    1.87 +#include "close_code.h"
    1.88 +
    1.89 +#endif /* _SDL_mouse_h */
    1.90 +
    1.91 +/* vi: set ts=4 sw=4 expandtab: */