include/SDL_touchscreen.h
branchgsoc2008_nds
changeset 2678 3895761db26a
parent 2677 6386764eb222
child 2679 bc3e3e889f6d
     1.1 --- a/include/SDL_touchscreen.h	Wed Jul 02 13:59:30 2008 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,153 +0,0 @@
     1.4 -/*
     1.5 -    SDL - Simple DirectMedia Layer
     1.6 -    Copyright (C) 1997-2006 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_touchscreen.h
    1.28 - *
    1.29 - * Include file for SDL touchscreen event handling
    1.30 - */
    1.31 -
    1.32 -#ifndef _SDL_touchscreen_h
    1.33 -#define _SDL_touchscreen_h
    1.34 -
    1.35 -#include "SDL_stdinc.h"
    1.36 -#include "SDL_error.h"
    1.37 -
    1.38 -#include "begin_code.h"
    1.39 -/* Set up for C function definitions, even when using C++ */
    1.40 -#ifdef __cplusplus
    1.41 -/* *INDENT-OFF* */
    1.42 -extern "C" {
    1.43 -/* *INDENT-ON* */
    1.44 -#endif
    1.45 -
    1.46 -/* In order to use these functions, SDL_Init() must have been called
    1.47 -   with the SDL_INIT_TOUCHSCREEN flag.  This causes SDL to scan the system
    1.48 -   for touchscreens, and load appropriate drivers.
    1.49 -*/
    1.50 -
    1.51 -/* The touchscreen structure used to identify an SDL touchscreen */
    1.52 -struct _SDL_Touchscreen;
    1.53 -typedef struct _SDL_Touchscreen SDL_Touchscreen;
    1.54 -
    1.55 -
    1.56 -/* Function prototypes */
    1.57 -/*
    1.58 - * Count the number of touchscreens attached to the system
    1.59 - */
    1.60 -extern DECLSPEC int SDLCALL SDL_NumTouchscreens(void);
    1.61 -
    1.62 -/*
    1.63 - * Get the implementation dependent name of a touchscreen.
    1.64 - * This can be called before any touchscreens are opened.
    1.65 - * If no name can be found, this function returns NULL.
    1.66 - */
    1.67 -extern DECLSPEC const char *SDLCALL SDL_TouchscreenName(int device_index);
    1.68 -
    1.69 -/*
    1.70 - * Open a touchscreen for use - the index passed as an argument refers to
    1.71 - * the N'th touchscreen on the system.  This index is the value which will
    1.72 - * identify this touchscreen in future touchscreen events.
    1.73 - *
    1.74 - * This function returns a touchscreen identifier, or NULL if an error occurred.
    1.75 - */
    1.76 -extern DECLSPEC SDL_Touchscreen *SDLCALL SDL_TouchscreenOpen(int device_index);
    1.77 -
    1.78 -/*
    1.79 - * Returns 1 if the touchscreen has been opened, or 0 if it has not.
    1.80 - */
    1.81 -extern DECLSPEC int SDLCALL SDL_TouchscreenOpened(int device_index);
    1.82 -
    1.83 -/*
    1.84 - * Get the device index of an opened touchscreen.
    1.85 - */
    1.86 -extern DECLSPEC int SDLCALL SDL_TouchscreenIndex(SDL_Touchscreen * touchscreen);
    1.87 -
    1.88 -/*
    1.89 - * Get the number of points a touchscreen can register at a time
    1.90 - * (single or multi-touch.)
    1.91 - */
    1.92 -extern DECLSPEC int SDLCALL SDL_TouchscreenMaxPoints(SDL_Touchscreen * touchscreen);
    1.93 -
    1.94 -/*
    1.95 - * Update the current state of the open touchscreens.
    1.96 - * This is called automatically by the event loop if any touchscreen
    1.97 - * events are enabled.
    1.98 - */
    1.99 -extern DECLSPEC void SDLCALL SDL_TouchscreenUpdate(void);
   1.100 -
   1.101 -/*
   1.102 - * Enable/disable touchscreen event polling.
   1.103 - * If touchscreen events are disabled, you must call SDL_TouchscreenUpdate()
   1.104 - * yourself and check the state of the touchscreen when you want touchscreen
   1.105 - * information.
   1.106 - * The state can be one of SDL_QUERY, SDL_ENABLE or SDL_IGNORE.
   1.107 - */
   1.108 -extern DECLSPEC int SDLCALL SDL_TouchscreenEventState(int state);
   1.109 -
   1.110 -/*
   1.111 - * Get the current X,Y position of the indicated point on the touchscreen.
   1.112 - *
   1.113 - * If not NULL, *x is set to an unsigned integer in the range [1,65535]
   1.114 - * where 1 is the left edge, 32768 is roughly center, 65535 is right edge.
   1.115 - * Similarly with *y, for the top, center, and bottom, respectively.
   1.116 - * The returned value is an unsigned integer in the range [1,65535],
   1.117 - * which represents the pressure of the touch.  This should be 32767 in
   1.118 - * non-pressure-sensitive driver implementations.
   1.119 - * If not being touched, 0 is returned and *x and *y are unmodified.
   1.120 - *
   1.121 - * The touch point indices start at index 0.
   1.122 - * If given a negative value for point, all the X,Y, and pressures
   1.123 - * for all the currently touched points on a multitouch device
   1.124 - * should be averaged and used for *x, *y, and the return value.
   1.125 - * If the value of point exceeds the number of points currently touched,
   1.126 - * 0 should be returned, and *x, *y should be left unmodified.
   1.127 - *
   1.128 - * On error, -1 is returned.
   1.129 - */
   1.130 -extern DECLSPEC Uint16 SDLCALL SDL_TouchscreenGetXY(SDL_Touchscreen *touchscreen,
   1.131 -                                                    int point, Uint16 *x, Uint16 *y);
   1.132 -
   1.133 -/*
   1.134 - * Get the number of currently touched points on a touchscreen.
   1.135 - * This is either 0 or 1 for a single-touch device.
   1.136 - * On error, -1 is returned.
   1.137 - */
   1.138 -extern DECLSPEC int SDLCALL SDL_TouchscreenGetPoints(SDL_Touchscreen * touchscreen);
   1.139 -
   1.140 -/*
   1.141 - * Close a touchscreen previously opened with SDL_TouchscreenOpen()
   1.142 - */
   1.143 -extern DECLSPEC void SDLCALL SDL_TouchscreenClose(SDL_Touchscreen * touchscreen);
   1.144 -
   1.145 -
   1.146 -/* Ends C function definitions when using C++ */
   1.147 -#ifdef __cplusplus
   1.148 -/* *INDENT-OFF* */
   1.149 -}
   1.150 -/* *INDENT-ON* */
   1.151 -#endif
   1.152 -#include "close_code.h"
   1.153 -
   1.154 -#endif /* _SDL_touchscreen_h */
   1.155 -
   1.156 -/* vi: set ts=4 sw=4 expandtab: */