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