include/SDL_input.h
author Ryan C. Gordon <icculus@icculus.org>
Fri, 03 Jun 2011 16:03:10 -0400
changeset 5547 4ccecd0901e2
parent 5535 96594ac5fd1a
child 6138 4c64952a58fb
permissions -rw-r--r--
Assert code's stdio interface was reading from the wrong variable.

Thanks to Frank Zago for the catch.
     1 /*
     2   Simple DirectMedia Layer
     3   Copyright (C) 1997-2011 Sam Lantinga <slouken@libsdl.org>
     4 
     5   This software is provided 'as-is', without any express or implied
     6   warranty.  In no event will the authors be held liable for any damages
     7   arising from the use of this software.
     8 
     9   Permission is granted to anyone to use this software for any purpose,
    10   including commercial applications, and to alter it and redistribute it
    11   freely, subject to the following restrictions:
    12 
    13   1. The origin of this software must not be misrepresented; you must not
    14      claim that you wrote the original software. If you use this software
    15      in a product, an acknowledgment in the product documentation would be
    16      appreciated but is not required.
    17   2. Altered source versions must be plainly marked as such, and must not be
    18      misrepresented as being the original software.
    19   3. This notice may not be removed or altered from any source distribution.
    20 */
    21 
    22 /**
    23  *  \file SDL_input.h
    24  *  
    25  *  Include file for lowlevel SDL input device handling.
    26  *
    27  *  This talks about individual devices, and not the system cursor. If you
    28  *  just want to know when the user moves the pointer somewhere in your
    29  *  window, this is NOT the API you want. This one handles things like
    30  *  multi-touch, drawing tablets, and multiple, separate mice.
    31  *
    32  *  The other API is in SDL_mouse.h
    33  */
    34 
    35 #ifndef _SDL_input_h
    36 #define _SDL_input_h
    37 
    38 #include "SDL_stdinc.h"
    39 #include "SDL_error.h"
    40 #include "SDL_video.h"
    41 
    42 #include "begin_code.h"
    43 /* Set up for C function definitions, even when using C++ */
    44 #ifdef __cplusplus
    45 /* *INDENT-OFF* */
    46 extern "C" {
    47 /* *INDENT-ON* */
    48 #endif
    49 
    50 
    51 /* Function prototypes */
    52 
    53 /* !!! FIXME: real documentation
    54  * - Redetect devices
    55  * - This invalidates all existing device information from previous queries!
    56  * - There is an implicit (re)detect upon SDL_Init().
    57  */
    58 extern DECLSPEC int SDLCALL SDL_RedetectInputDevices(void);
    59 
    60 /**
    61  *  \brief Get the number of mouse input devices available.
    62  */
    63 extern DECLSPEC int SDLCALL SDL_GetNumInputDevices(void);
    64 
    65 /**
    66  *  \brief Gets the name of a device with the given index.
    67  *  
    68  *  \param index is the index of the device, whose name is to be returned.
    69  *  
    70  *  \return the name of the device with the specified index
    71  */
    72 extern DECLSPEC const char *SDLCALL SDL_GetInputDeviceName(int index);
    73 
    74 
    75 extern DECLSPEC int SDLCALL SDL_IsDeviceDisconnected(int index);
    76 
    77 /* Ends C function definitions when using C++ */
    78 #ifdef __cplusplus
    79 /* *INDENT-OFF* */
    80 }
    81 /* *INDENT-ON* */
    82 #endif
    83 #include "close_code.h"
    84 
    85 #endif /* _SDL_mouse_h */
    86 
    87 /* vi: set ts=4 sw=4 expandtab: */