src/touchscreen/dummy/SDL_systouchscreen.c
branchgsoc2008_nds
changeset 2678 3895761db26a
parent 2677 6386764eb222
child 2679 bc3e3e889f6d
equal deleted inserted replaced
2677:6386764eb222 2678:3895761db26a
     1 /*
       
     2     SDL - Simple DirectMedia Layer
       
     3     Copyright (C) 1997-2006 Sam Lantinga
       
     4 
       
     5     This library is free software; you can redistribute it and/or
       
     6     modify it under the terms of the GNU Lesser General Public
       
     7     License as published by the Free Software Foundation; either
       
     8     version 2.1 of the License, or (at your option) any later version.
       
     9 
       
    10     This library is distributed in the hope that it will be useful,
       
    11     but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
       
    13     Lesser General Public License for more details.
       
    14 
       
    15     You should have received a copy of the GNU Lesser General Public
       
    16     License along with this library; if not, write to the Free Software
       
    17     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
       
    18 
       
    19     Sam Lantinga
       
    20     slouken@libsdl.org
       
    21 */
       
    22 #include "SDL_config.h"
       
    23 
       
    24 #if defined(SDL_TOUCHSCREEN_DUMMY) || defined(SDL_TOUCHSCREEN_DISABLED)
       
    25 
       
    26 /* This is the system specific header for the SDL touchscreen API */
       
    27 
       
    28 #include "SDL_touchscreen.h"
       
    29 #include "../SDL_systouchscreen.h"
       
    30 #include "../SDL_touchscreen_c.h"
       
    31 
       
    32 /* Function to scan the system for touchscreen.
       
    33  * This function should set SDL_numtouchscreens to the number of available
       
    34  * touchscreens.  Touchscreen 0 should be the system default touchscreen.
       
    35  * It should return 0, or -1 on an unrecoverable fatal error.
       
    36  */
       
    37 int
       
    38 SDL_SYS_TouchscreenInit(void)
       
    39 {
       
    40     SDL_numtouchscreens = 0;
       
    41     return (0);
       
    42 }
       
    43 
       
    44 /* Function to get the device-dependent name of a touchscreen */
       
    45 const char *
       
    46 SDL_SYS_TouchscreenName(int index)
       
    47 {
       
    48     SDL_SetError("Logic error: No touchscreens available");
       
    49     return (NULL);
       
    50 }
       
    51 
       
    52 /* Function to open a touchscreen for use.
       
    53    The touchscreen to open is specified by the index field of the touchscreen.
       
    54    This should fill the maxpoints field of the touchscreen structure.
       
    55    It returns 0, or -1 if there is an error.
       
    56  */
       
    57 int
       
    58 SDL_SYS_TouchscreenOpen(SDL_Touchscreen * touchscreen)
       
    59 {
       
    60     SDL_SetError("Logic error: No touchscreens available");
       
    61     return (-1);
       
    62 }
       
    63 
       
    64 /* Function to update the state of a touchscreen - called as a device poll.
       
    65  * This function shouldn't update the touchscreen structure directly,
       
    66  * but instead should call SDL_PrivateTouchscreen*() to deliver events
       
    67  * and update touchscreen device state.
       
    68  */
       
    69 void
       
    70 SDL_SYS_TouchscreenUpdate(SDL_Touchscreen * touchscreen)
       
    71 {
       
    72     return;
       
    73 }
       
    74 
       
    75 /* Function to close a touchscreen after use */
       
    76 void
       
    77 SDL_SYS_TouchscreenClose(SDL_Touchscreen * touchscreen)
       
    78 {
       
    79     return;
       
    80 }
       
    81 
       
    82 /* Function to perform any system-specific touchscreen related cleanup */
       
    83 void
       
    84 SDL_SYS_TouchscreenQuit(void)
       
    85 {
       
    86     return;
       
    87 }
       
    88 
       
    89 #endif /* SDL_TOUCHSCREEN_DUMMY || SDL_TOUCHSCREEN_DISABLED */
       
    90 /* vi: set ts=4 sw=4 expandtab: */