Added Iphone project. Iphone multi-touch is now functional.
authorjimtla
Sat, 31 Jul 2010 01:24:50 +0400
changeset 467731607094315c
parent 4676 99b4560b7aa1
child 4678 f8431f66613d
Added Iphone project. Iphone multi-touch is now functional.
Xcode-iPhoneOS/Demos/DemosiPhoneOS.xcodeproj/project.pbxproj
src/events/SDL_touch_c.h
src/video/uikit/SDL_uikitview.h
src/video/uikit/SDL_uikitview.m
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/Default.png
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/Icon.png
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/Info.plist
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_assert.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_atomic.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_audio.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_clipboard.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_compat.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_config.h.default
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_config.h.generated
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_config.h.in
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_config_iphoneos.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_config_macosx.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_config_minimal.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_config_nintendods.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_config_pandora.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_config_win32.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_config_wiz.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_copying.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_cpuinfo.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_endian.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_error.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_events.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_gesture.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_haptic.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_input.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_joystick.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_keyboard.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_keysym.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_loadso.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_main.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_mouse.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_mutex.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_name.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_opengl.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_opengles.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_pixels.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_platform.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_power.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_quit.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_rect.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_rwops.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_scancode.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_stdinc.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_surface.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_syswm.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_thread.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_timer.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_touch.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_types.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_version.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_video.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/begin_code.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/close_code.h
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/doxyfile
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/lib/libSDLiPhoneOS.a
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/main.c
touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/touchTestIPhone.xcodeproj/project.pbxproj
     1.1 --- a/Xcode-iPhoneOS/Demos/DemosiPhoneOS.xcodeproj/project.pbxproj	Fri Jul 30 23:18:35 2010 +0400
     1.2 +++ b/Xcode-iPhoneOS/Demos/DemosiPhoneOS.xcodeproj/project.pbxproj	Sat Jul 31 01:24:50 2010 +0400
     1.3 @@ -109,7 +109,7 @@
     1.4  			isa = PBXContainerItemProxy;
     1.5  			containerPortal = FD1B48920E313154007AB34E /* SDLiPhoneOS.xcodeproj */;
     1.6  			proxyType = 2;
     1.7 -			remoteGlobalIDString = 006E982211955059001DE610 /* testsdl.app */;
     1.8 +			remoteGlobalIDString = 006E982211955059001DE610;
     1.9  			remoteInfo = testsdl;
    1.10  		};
    1.11  		FD1B489D0E313154007AB34E /* PBXContainerItemProxy */ = {
     2.1 --- a/src/events/SDL_touch_c.h	Fri Jul 30 23:18:35 2010 +0400
     2.2 +++ b/src/events/SDL_touch_c.h	Sat Jul 31 01:24:50 2010 +0400
     2.3 @@ -58,6 +58,10 @@
     2.4  extern int SDL_SendTouchMotion(long id, long fingerid,
     2.5  			       int relative, float x, float y, float z);
     2.6  
     2.7 +/* Send a touch down/up event for a touch */
     2.8 +extern int SDL_SendFingerDown(long id, long fingerid, SDL_bool down, 
     2.9 +							  float x, float y, float pressure);
    2.10 +
    2.11  /* Send a touch button event for a touch */
    2.12  extern int SDL_SendTouchButton(long id, Uint8 state, Uint8 button);
    2.13  
    2.14 @@ -67,6 +71,9 @@
    2.15  /* Get the index of a touch device */
    2.16  extern int SDL_GetTouchIndexId(long id);
    2.17  
    2.18 +/* Print a debug message for a nonexistent touch */
    2.19 +extern int SDL_TouchNotFoundError(long id);
    2.20 +
    2.21  #endif /* _SDL_touch_c_h */
    2.22  
    2.23  /* vi: set ts=4 sw=4 expandtab: */
     3.1 --- a/src/video/uikit/SDL_uikitview.h	Fri Jul 30 23:18:35 2010 +0400
     3.2 +++ b/src/video/uikit/SDL_uikitview.h	Sat Jul 31 01:24:50 2010 +0400
     3.3 @@ -23,6 +23,9 @@
     3.4  #include "SDL_stdinc.h"
     3.5  #include "SDL_events.h"
     3.6  
     3.7 +#define IPHONE_TOUCH_EFFICIENT_DANGEROUS
     3.8 +#define FIXED_MULTITOUCH
     3.9 +
    3.10  #ifndef IPHONE_TOUCH_EFFICIENT_DANGEROUS
    3.11  #define MAX_SIMULTANEOUS_TOUCHES 5
    3.12  #endif
    3.13 @@ -34,7 +37,7 @@
    3.14  @interface SDL_uikitview : UIView {
    3.15  #endif
    3.16  
    3.17 -#if FIXED_MULTITOUCH
    3.18 +#ifdef FIXED_MULTITOUCH
    3.19  	long touchId;
    3.20  #ifndef IPHONE_TOUCH_EFFICIENT_DANGEROUS
    3.21  	UITouch *finger[MAX_SIMULTANEOUS_TOUCHES];
     4.1 --- a/src/video/uikit/SDL_uikitview.m	Fri Jul 30 23:18:35 2010 +0400
     4.2 +++ b/src/video/uikit/SDL_uikitview.m	Sat Jul 31 01:24:50 2010 +0400
     4.3 @@ -24,6 +24,7 @@
     4.4  
     4.5  #include "../../events/SDL_keyboard_c.h"
     4.6  #include "../../events/SDL_mouse_c.h"
     4.7 +#include "../../events/SDL_touch_c.h"
     4.8  
     4.9  #if SDL_IPHONE_KEYBOARD
    4.10  #import "keyinfotable.h"
    4.11 @@ -48,7 +49,7 @@
    4.12  	[self initializeKeyboard];
    4.13  #endif	
    4.14  
    4.15 -#if FIXED_MULTITOUCH
    4.16 +#ifdef FIXED_MULTITOUCH
    4.17  	SDL_Touch touch;
    4.18  	touch.id = 0; //TODO: Should be -1?
    4.19  
    4.20 @@ -78,6 +79,8 @@
    4.21  	NSEnumerator *enumerator = [touches objectEnumerator];
    4.22  	UITouch *touch = (UITouch*)[enumerator nextObject];
    4.23  	
    4.24 +	//NSLog("Click");
    4.25 +	
    4.26  	if (touch) {
    4.27  		CGPoint locationInView = [touch locationInView: self];
    4.28  			
    4.29 @@ -88,7 +91,7 @@
    4.30  		SDL_SendMouseButton(NULL, SDL_PRESSED, SDL_BUTTON_LEFT);
    4.31  	}
    4.32  
    4.33 -#if FIXED_MULTITOUCH
    4.34 +#ifdef FIXED_MULTITOUCH
    4.35  	while(touch) {
    4.36  	  CGPoint locationInView = [touch locationInView: self];
    4.37  
    4.38 @@ -131,7 +134,7 @@
    4.39  		SDL_SendMouseButton(NULL, SDL_RELEASED, SDL_BUTTON_LEFT);
    4.40  	}
    4.41  
    4.42 -#if FIXED_MULTITOUCH
    4.43 +#ifdef FIXED_MULTITOUCH
    4.44  	while(touch) {
    4.45  	  CGPoint locationInView = [touch locationInView: self];
    4.46  	  
    4.47 @@ -178,7 +181,7 @@
    4.48  		SDL_SendMouseMotion(NULL, 0, locationInView.x, locationInView.y);
    4.49  	}
    4.50  
    4.51 -#if FIXED_MULTITOUCH
    4.52 +#ifdef FIXED_MULTITOUCH
    4.53  	while(touch) {
    4.54  	  CGPoint locationInView = [touch locationInView: self];
    4.55  	  
     5.1 Binary file touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/Default.png has changed
     6.1 Binary file touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/Icon.png has changed
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/Info.plist	Sat Jul 31 01:24:50 2010 +0400
     7.3 @@ -0,0 +1,28 @@
     7.4 +<?xml version="1.0" encoding="UTF-8"?>
     7.5 +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
     7.6 +<plist version="1.0">
     7.7 +<dict>
     7.8 +	<key>CFBundleDevelopmentRegion</key>
     7.9 +	<string>en</string>
    7.10 +	<key>CFBundleDisplayName</key>
    7.11 +	<string>${PRODUCT_NAME}</string>
    7.12 +	<key>CFBundleExecutable</key>
    7.13 +	<string>${EXECUTABLE_NAME}</string>
    7.14 +	<key>CFBundleIconFile</key>
    7.15 +	<string>Icon</string>
    7.16 +	<key>CFBundleIdentifier</key>
    7.17 +	<string>com.yourcompany.${PRODUCT_NAME:identifier}</string>
    7.18 +	<key>CFBundleInfoDictionaryVersion</key>
    7.19 +	<string>6.0</string>
    7.20 +	<key>CFBundleName</key>
    7.21 +	<string>${PRODUCT_NAME}</string>
    7.22 +	<key>CFBundlePackageType</key>
    7.23 +	<string>APPL</string>
    7.24 +	<key>CFBundleSignature</key>
    7.25 +	<string>????</string>
    7.26 +	<key>CFBundleVersion</key>
    7.27 +	<string>1.0</string>
    7.28 +	<key>LSRequiresIPhoneOS</key>
    7.29 +	<false/>
    7.30 +</dict>
    7.31 +</plist>
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL.h	Sat Jul 31 01:24:50 2010 +0400
     8.3 @@ -0,0 +1,165 @@
     8.4 +/*
     8.5 +    SDL - Simple DirectMedia Layer
     8.6 +    Copyright (C) 1997-2010 Sam Lantinga
     8.7 +
     8.8 +    This library is free software; you can redistribute it and/or
     8.9 +    modify it under the terms of the GNU Lesser General Public
    8.10 +    License as published by the Free Software Foundation; either
    8.11 +    version 2.1 of the License, or (at your option) any later version.
    8.12 +
    8.13 +    This library is distributed in the hope that it will be useful,
    8.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
    8.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    8.16 +    Lesser General Public License for more details.
    8.17 +
    8.18 +    You should have received a copy of the GNU Lesser General Public
    8.19 +    License along with this library; if not, write to the Free Software
    8.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    8.21 +
    8.22 +    Sam Lantinga
    8.23 +    slouken@libsdl.org
    8.24 +*/
    8.25 +
    8.26 +/**
    8.27 + *  \file SDL.h
    8.28 + *  
    8.29 + *  Main include header for the SDL library
    8.30 + */
    8.31 +
    8.32 +/**
    8.33 + *  \mainpage Simple DirectMedia Layer (SDL)
    8.34 + *  
    8.35 + *  http://www.libsdl.org/
    8.36 + *  
    8.37 + *  \section intro_sec Introduction
    8.38 + *  
    8.39 + *  This is the Simple DirectMedia Layer, a general API that provides low
    8.40 + *  level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL,
    8.41 + *  and 2D framebuffer across multiple platforms.
    8.42 + *  
    8.43 + *  The current version supports Windows, Windows CE, Mac OS X, Linux,
    8.44 + *  FreeBSD, NetBSD, OpenBSD, BSD/OS, Solaris, and QNX. The code contains
    8.45 + *  support for other operating systems but those are not officially supported. 
    8.46 + *  
    8.47 + *  SDL is written in C, but works with C++ natively, and has bindings to
    8.48 + *  several other languages, including Ada, C#, Eiffel, Erlang, Euphoria,
    8.49 + *  Guile, Haskell, Java, Lisp, Lua, ML, Objective C, Pascal, Perl, PHP,
    8.50 + *  Pike, Pliant, Python, Ruby, and Smalltalk.
    8.51 + *  
    8.52 + *  This library is distributed under GNU LGPL version 2, which can be
    8.53 + *  found in the file  "COPYING".  This license allows you to use SDL
    8.54 + *  freely in commercial programs as long as you link with the dynamic
    8.55 + *  library.
    8.56 + *  
    8.57 + *  The best way to learn how to use SDL is to check out the header files in
    8.58 + *  the "include" subdirectory and the programs in the "test" subdirectory.
    8.59 + *  The header files and test programs are well commented and always up to date.
    8.60 + *  More documentation is available in HTML format in "docs/index.html", and
    8.61 + *  a documentation wiki is available online at:
    8.62 + *  	http://www.libsdl.org/cgi/docwiki.cgi
    8.63 + *  
    8.64 + *  The test programs in the "test" subdirectory are in the public domain.
    8.65 + *  
    8.66 + *  Frequently asked questions are answered online:
    8.67 + *  	http://www.libsdl.org/faq.php
    8.68 + *  
    8.69 + *  If you need help with the library, or just want to discuss SDL related
    8.70 + *  issues, you can join the developers mailing list:
    8.71 + *  	http://www.libsdl.org/mailing-list.php
    8.72 + *  
    8.73 + *  Enjoy!
    8.74 + *  	Sam Lantinga				(slouken@libsdl.org)
    8.75 + */
    8.76 +
    8.77 +#ifndef _SDL_H
    8.78 +#define _SDL_H
    8.79 +
    8.80 +#include "SDL_main.h"
    8.81 +#include "SDL_stdinc.h"
    8.82 +#include "SDL_atomic.h"
    8.83 +#include "SDL_audio.h"
    8.84 +#include "SDL_clipboard.h"
    8.85 +#include "SDL_cpuinfo.h"
    8.86 +#include "SDL_endian.h"
    8.87 +#include "SDL_error.h"
    8.88 +#include "SDL_events.h"
    8.89 +#include "SDL_loadso.h"
    8.90 +#include "SDL_mutex.h"
    8.91 +#include "SDL_power.h"
    8.92 +#include "SDL_rwops.h"
    8.93 +#include "SDL_thread.h"
    8.94 +#include "SDL_timer.h"
    8.95 +#include "SDL_version.h"
    8.96 +#include "SDL_video.h"
    8.97 +#include "SDL_compat.h"
    8.98 +
    8.99 +#include "begin_code.h"
   8.100 +/* Set up for C function definitions, even when using C++ */
   8.101 +#ifdef __cplusplus
   8.102 +/* *INDENT-OFF* */
   8.103 +extern "C" {
   8.104 +/* *INDENT-ON* */
   8.105 +#endif
   8.106 +
   8.107 +/* As of version 0.5, SDL is loaded dynamically into the application */
   8.108 +
   8.109 +/**
   8.110 + *  \name SDL_INIT_*
   8.111 + *  
   8.112 + *  These are the flags which may be passed to SDL_Init().  You should
   8.113 + *  specify the subsystems which you will be using in your application.
   8.114 + */
   8.115 +/*@{*/
   8.116 +#define SDL_INIT_TIMER          0x00000001
   8.117 +#define SDL_INIT_AUDIO          0x00000010
   8.118 +#define SDL_INIT_VIDEO          0x00000020
   8.119 +#define SDL_INIT_JOYSTICK       0x00000200
   8.120 +#define SDL_INIT_HAPTIC         0x00001000
   8.121 +#define SDL_INIT_NOPARACHUTE    0x00100000      /**< Don't catch fatal signals */
   8.122 +#define SDL_INIT_EVENTTHREAD    0x01000000      /**< Not supported on all OS's */
   8.123 +#define SDL_INIT_EVERYTHING     0x0000FFFF
   8.124 +/*@}*/
   8.125 +
   8.126 +/**
   8.127 + *  This function loads the SDL dynamically linked library and initializes 
   8.128 + *  the subsystems specified by \c flags (and those satisfying dependencies).
   8.129 + *  Unless the ::SDL_INIT_NOPARACHUTE flag is set, it will install cleanup
   8.130 + *  signal handlers for some commonly ignored fatal signals (like SIGSEGV).
   8.131 + */
   8.132 +extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
   8.133 +
   8.134 +/**
   8.135 + *  This function initializes specific SDL subsystems
   8.136 + */
   8.137 +extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
   8.138 +
   8.139 +/**
   8.140 + *  This function cleans up specific SDL subsystems
   8.141 + */
   8.142 +extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
   8.143 +
   8.144 +/**
   8.145 + *  This function returns mask of the specified subsystems which have
   8.146 + *  been initialized.
   8.147 + *  
   8.148 + *  If \c flags is 0, it returns a mask of all initialized subsystems.
   8.149 + */
   8.150 +extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
   8.151 +
   8.152 +/**
   8.153 + *  This function cleans up all initialized subsystems and unloads the
   8.154 + *  dynamically linked library.  You should call it upon all exit conditions.
   8.155 + */
   8.156 +extern DECLSPEC void SDLCALL SDL_Quit(void);
   8.157 +
   8.158 +/* Ends C function definitions when using C++ */
   8.159 +#ifdef __cplusplus
   8.160 +/* *INDENT-OFF* */
   8.161 +}
   8.162 +/* *INDENT-ON* */
   8.163 +#endif
   8.164 +#include "close_code.h"
   8.165 +
   8.166 +#endif /* _SDL_H */
   8.167 +
   8.168 +/* vi: set ts=4 sw=4 expandtab: */
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_assert.h	Sat Jul 31 01:24:50 2010 +0400
     9.3 @@ -0,0 +1,241 @@
     9.4 +/*
     9.5 +    SDL - Simple DirectMedia Layer
     9.6 +    Copyright (C) 1997-2010 Sam Lantinga
     9.7 +
     9.8 +    This library is free software; you can redistribute it and/or
     9.9 +    modify it under the terms of the GNU Lesser General Public
    9.10 +    License as published by the Free Software Foundation; either
    9.11 +    version 2.1 of the License, or (at your option) any later version.
    9.12 +
    9.13 +    This library is distributed in the hope that it will be useful,
    9.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
    9.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    9.16 +    Lesser General Public License for more details.
    9.17 +
    9.18 +    You should have received a copy of the GNU Lesser General Public
    9.19 +    License along with this library; if not, write to the Free Software
    9.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    9.21 +
    9.22 +    Sam Lantinga
    9.23 +    slouken@libsdl.org
    9.24 +*/
    9.25 +
    9.26 +#ifndef _SDL_assert_h
    9.27 +#define _SDL_assert_h
    9.28 +
    9.29 +#include "SDL_config.h"
    9.30 +
    9.31 +#include "begin_code.h"
    9.32 +/* Set up for C function definitions, even when using C++ */
    9.33 +#ifdef __cplusplus
    9.34 +/* *INDENT-OFF* */
    9.35 +extern "C" {
    9.36 +/* *INDENT-ON* */
    9.37 +#endif
    9.38 +
    9.39 +#ifndef SDL_ASSERT_LEVEL
    9.40 +#ifdef SDL_DEFAULT_ASSERT_LEVEL
    9.41 +#define SDL_ASSERT_LEVEL SDL_DEFAULT_ASSERT_LEVEL
    9.42 +#elif defined(_DEBUG) || defined(DEBUG) || \
    9.43 +      (defined(__GNUC__) && !defined(__OPTIMIZE__))
    9.44 +#define SDL_ASSERT_LEVEL 2
    9.45 +#else
    9.46 +#define SDL_ASSERT_LEVEL 1
    9.47 +#endif
    9.48 +#endif /* SDL_ASSERT_LEVEL */
    9.49 +
    9.50 +/*
    9.51 +These are macros and not first class functions so that the debugger breaks
    9.52 +on the assertion line and not in some random guts of SDL, and so each
    9.53 +assert can have unique static variables associated with it.
    9.54 +*/
    9.55 +
    9.56 +#if (defined(_MSC_VER) && ((_M_IX86) || (_M_X64)))
    9.57 +    #define SDL_TriggerBreakpoint() __asm { int 3 }
    9.58 +#elif (defined(__GNUC__) && ((__i386__) || (__x86_64__)))
    9.59 +    #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
    9.60 +#elif defined(HAVE_SIGNAL_H)
    9.61 +    #include <signal.h>
    9.62 +    #define SDL_TriggerBreakpoint() raise(SIGTRAP)
    9.63 +#else
    9.64 +    /* How do we trigger breakpoints on this platform? */
    9.65 +    #define SDL_TriggerBreakpoint()
    9.66 +#endif
    9.67 +
    9.68 +#if (__STDC_VERSION__ >= 199901L) /* C99 supports __func__ as a standard. */
    9.69 +#   define SDL_FUNCTION __func__
    9.70 +#elif ((__GNUC__ >= 2) || defined(_MSC_VER))
    9.71 +#   define SDL_FUNCTION __FUNCTION__
    9.72 +#else
    9.73 +#   define SDL_FUNCTION "???"
    9.74 +#endif
    9.75 +#define SDL_FILE    __FILE__
    9.76 +#define SDL_LINE    __LINE__
    9.77 +
    9.78 +/*
    9.79 +sizeof (x) makes the compiler still parse the expression even without
    9.80 +assertions enabled, so the code is always checked at compile time, but
    9.81 +doesn't actually generate code for it, so there are no side effects or
    9.82 +expensive checks at run time, just the constant size of what x WOULD be,
    9.83 +which presumably gets optimized out as unused.
    9.84 +This also solves the problem of...
    9.85 +
    9.86 +    int somevalue = blah();
    9.87 +    SDL_assert(somevalue == 1);
    9.88 +
    9.89 +...which would cause compiles to complain that somevalue is unused if we
    9.90 +disable assertions.
    9.91 +*/
    9.92 +
    9.93 +#define SDL_disabled_assert(condition) \
    9.94 +    do { (void) sizeof ((condition)); } while (0)
    9.95 +
    9.96 +#if (SDL_ASSERT_LEVEL > 0)
    9.97 +
    9.98 +typedef enum
    9.99 +{
   9.100 +    SDL_ASSERTION_RETRY,  /**< Retry the assert immediately. */
   9.101 +    SDL_ASSERTION_BREAK,  /**< Make the debugger trigger a breakpoint. */
   9.102 +    SDL_ASSERTION_ABORT,  /**< Terminate the program. */
   9.103 +    SDL_ASSERTION_IGNORE,  /**< Ignore the assert. */
   9.104 +    SDL_ASSERTION_ALWAYS_IGNORE,  /**< Ignore the assert from now on. */
   9.105 +} SDL_assert_state;
   9.106 +
   9.107 +typedef struct SDL_assert_data
   9.108 +{
   9.109 +    int always_ignore;
   9.110 +    unsigned int trigger_count;
   9.111 +    const char *condition;
   9.112 +    const char *filename;
   9.113 +    int linenum;
   9.114 +    const char *function;
   9.115 +    const struct SDL_assert_data *next;
   9.116 +} SDL_assert_data;
   9.117 +
   9.118 +/* Never call this directly. Use the SDL_assert* macros. */
   9.119 +extern DECLSPEC SDL_assert_state SDLCALL SDL_ReportAssertion(SDL_assert_data *,
   9.120 +                                                             const char *,
   9.121 +                                                             const char *, int);
   9.122 +
   9.123 +/* the do {} while(0) avoids dangling else problems:
   9.124 +    if (x) SDL_assert(y); else blah();
   9.125 +       ... without the do/while, the "else" could attach to this macro's "if".
   9.126 +   We try to handle just the minimum we need here in a macro...the loop,
   9.127 +   the static vars, and break points. The heavy lifting is handled in
   9.128 +   SDL_ReportAssertion(), in SDL_assert.c.
   9.129 +*/
   9.130 +#define SDL_enabled_assert(condition) \
   9.131 +    do { \
   9.132 +        while ( !(condition) ) { \
   9.133 +            static struct SDL_assert_data assert_data = { \
   9.134 +                0, 0, #condition, 0, 0, 0, 0 \
   9.135 +            }; \
   9.136 +            const SDL_assert_state state = SDL_ReportAssertion(&assert_data, \
   9.137 +                                                               SDL_FUNCTION, \
   9.138 +                                                               SDL_FILE, \
   9.139 +                                                               SDL_LINE); \
   9.140 +            if (state == SDL_ASSERTION_RETRY) { \
   9.141 +                continue; /* go again. */ \
   9.142 +            } else if (state == SDL_ASSERTION_BREAK) { \
   9.143 +                SDL_TriggerBreakpoint(); \
   9.144 +            } \
   9.145 +            break; /* not retrying. */ \
   9.146 +        } \
   9.147 +    } while (0)
   9.148 +
   9.149 +#endif  /* enabled assertions support code */
   9.150 +
   9.151 +/* Enable various levels of assertions. */
   9.152 +#if SDL_ASSERT_LEVEL == 0   /* assertions disabled */
   9.153 +#   define SDL_assert(condition) SDL_disabled_assert(condition)
   9.154 +#   define SDL_assert_release(condition) SDL_disabled_assert(condition)
   9.155 +#   define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
   9.156 +#elif SDL_ASSERT_LEVEL == 1  /* release settings. */
   9.157 +#   define SDL_assert(condition) SDL_disabled_assert(condition)
   9.158 +#   define SDL_assert_release(condition) SDL_enabled_assert(condition)
   9.159 +#   define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
   9.160 +#elif SDL_ASSERT_LEVEL == 2  /* normal settings. */
   9.161 +#   define SDL_assert(condition) SDL_enabled_assert(condition)
   9.162 +#   define SDL_assert_release(condition) SDL_enabled_assert(condition)
   9.163 +#   define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
   9.164 +#elif SDL_ASSERT_LEVEL == 3  /* paranoid settings. */
   9.165 +#   define SDL_assert(condition) SDL_enabled_assert(condition)
   9.166 +#   define SDL_assert_release(condition) SDL_enabled_assert(condition)
   9.167 +#   define SDL_assert_paranoid(condition) SDL_enabled_assert(condition)
   9.168 +#else
   9.169 +#   error Unknown assertion level.
   9.170 +#endif
   9.171 +
   9.172 +
   9.173 +typedef SDL_assert_state (SDLCALL *SDL_AssertionHandler)(
   9.174 +                                    const SDL_assert_data *, void *userdata);
   9.175 +
   9.176 +/**
   9.177 + *  \brief Set an application-defined assertion handler.
   9.178 + *
   9.179 + *  This allows an app to show its own assertion UI and/or force the
   9.180 + *  response to an assertion failure. If the app doesn't provide this, SDL
   9.181 + *  will try to do the right thing, popping up a system-specific GUI dialog,
   9.182 + *  and probably minimizing any fullscreen windows.
   9.183 + *
   9.184 + *  This callback may fire from any thread, but it runs wrapped in a mutex, so
   9.185 + *  it will only fire from one thread at a time.
   9.186 + *
   9.187 + *  Setting the callback to NULL restores SDL's original internal handler.
   9.188 + *
   9.189 + *  This callback is NOT reset to SDL's internal handler upon SDL_Quit()!
   9.190 + *
   9.191 + *  \return SDL_assert_state value of how to handle the assertion failure.
   9.192 + *  
   9.193 + *  \param handler Callback function, called when an assertion fails.
   9.194 + *  \param userdata A pointer passed to the callback as-is.
   9.195 + */
   9.196 +extern DECLSPEC void SDLCALL SDL_SetAssertionHandler(
   9.197 +                                            SDL_AssertionHandler handler,
   9.198 +                                            void *userdata);
   9.199 +
   9.200 +/**
   9.201 + *  \brief Get a list of all assertion failures.
   9.202 + *
   9.203 + *  Get all assertions triggered since last call to SDL_ResetAssertionReport(),
   9.204 + *  or the start of the program.
   9.205 + *
   9.206 + *  The proper way to examine this data looks something like this:
   9.207 + *
   9.208 + *  <code>
   9.209 + *  const SDL_assert_data *item = SDL_GetAssertionReport();
   9.210 + *  while (item->condition) {
   9.211 + *      printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\n",
   9.212 + *             item->condition, item->function, item->filename,
   9.213 + *             item->linenum, item->trigger_count,
   9.214 + *             item->always_ignore ? "yes" : "no");
   9.215 + *      item = item->next;
   9.216 + *  }
   9.217 + *  </code>
   9.218 + *
   9.219 + *  \return List of all assertions. This never returns NULL,
   9.220 + *          even if there are no items.
   9.221 + *  \sa SDL_ResetAssertionReport
   9.222 + */
   9.223 +extern DECLSPEC const SDL_assert_data * SDLCALL SDL_GetAssertionReport(void);
   9.224 +
   9.225 +/**
   9.226 + *  \brief Reset the list of all assertion failures.
   9.227 + *
   9.228 + *  Reset list of all assertions triggered.
   9.229 + *
   9.230 + *  \sa SDL_GetAssertionReport
   9.231 + */
   9.232 +extern DECLSPEC void SDLCALL SDL_ResetAssertionReport(void);
   9.233 +
   9.234 +/* Ends C function definitions when using C++ */
   9.235 +#ifdef __cplusplus
   9.236 +/* *INDENT-OFF* */
   9.237 +}
   9.238 +/* *INDENT-ON* */
   9.239 +#endif
   9.240 +#include "close_code.h"
   9.241 +
   9.242 +#endif /* _SDL_assert_h */
   9.243 +
   9.244 +/* vi: set ts=4 sw=4 expandtab: */
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_atomic.h	Sat Jul 31 01:24:50 2010 +0400
    10.3 @@ -0,0 +1,216 @@
    10.4 +/*
    10.5 +    SDL - Simple DirectMedia Layer
    10.6 +    Copyright (C) 1997-2010 Sam Lantinga
    10.7 +
    10.8 +    This library is free software; you can redistribute it and/or
    10.9 +    modify it under the terms of the GNU Lesser General Public
   10.10 +    License as published by the Free Software Foundation; either
   10.11 +    version 2.1 of the License, or (at your option) any later version.
   10.12 +
   10.13 +    This library is distributed in the hope that it will be useful,
   10.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   10.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   10.16 +    Lesser General Public License for more details.
   10.17 +
   10.18 +    You should have received a copy of the GNU Lesser General Public
   10.19 +    License along with this library; if not, write to the Free Software
   10.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   10.21 +
   10.22 +    Sam Lantinga
   10.23 +    slouken@libsdl.org
   10.24 +
   10.25 +    Contributed by Bob Pendleton, bob@pendleton.com
   10.26 + */
   10.27 +
   10.28 +/**
   10.29 + *  \file SDL_atomic.h
   10.30 + *  
   10.31 + *  Atomic operations.
   10.32 + *  
   10.33 + *  These operations may, or may not, actually be implemented using
   10.34 + *  processor specific atomic operations. When possible they are
   10.35 + *  implemented as true processor specific atomic operations. When that
   10.36 + *  is not possible the are implemented using locks that *do* use the
   10.37 + *  available atomic operations.
   10.38 + *  
   10.39 + *  At the very minimum spin locks must be implemented. Without spin
   10.40 + *  locks it is not possible (AFAICT) to emulate the rest of the atomic
   10.41 + *  operations.
   10.42 + */
   10.43 +
   10.44 +#ifndef _SDL_atomic_h_
   10.45 +#define _SDL_atomic_h_
   10.46 +
   10.47 +#include "SDL_stdinc.h"
   10.48 +#include "SDL_platform.h"
   10.49 +
   10.50 +#include "begin_code.h"
   10.51 +
   10.52 +/* Set up for C function definitions, even when using C++ */
   10.53 +#ifdef __cplusplus
   10.54 +/* *INDENT-OFF* */
   10.55 +extern "C" {
   10.56 +/* *INDENT-ON* */
   10.57 +#endif
   10.58 +
   10.59 +/* Function prototypes */
   10.60 +
   10.61 +/**
   10.62 + *  \name SDL AtomicLock
   10.63 + *  
   10.64 + *  The spin lock functions and type are required and can not be
   10.65 + *  emulated because they are used in the emulation code.
   10.66 + */
   10.67 +/*@{*/
   10.68 +
   10.69 +typedef volatile Uint32 SDL_SpinLock;
   10.70 +
   10.71 +/**
   10.72 + *  \brief Lock a spin lock by setting it to a none zero value.
   10.73 + *  
   10.74 + *  \param lock Points to the lock.
   10.75 + */
   10.76 +extern DECLSPEC void SDLCALL SDL_AtomicLock(SDL_SpinLock *lock);
   10.77 +
   10.78 +/**
   10.79 + *  \brief Unlock a spin lock by setting it to 0. Always returns immediately
   10.80 + *
   10.81 + *  \param lock Points to the lock.
   10.82 + */
   10.83 +extern DECLSPEC void SDLCALL SDL_AtomicUnlock(SDL_SpinLock *lock);
   10.84 +
   10.85 +/*@}*//*SDL AtomicLock*/
   10.86 +
   10.87 +/**
   10.88 + *  \name 32 bit atomic operations
   10.89 + */
   10.90 +/*@{*/
   10.91 +
   10.92 +/**
   10.93 + *  \brief Check to see if \c *ptr == 0 and set it to 1.
   10.94 + *  
   10.95 + *  \return SDL_True if the value pointed to by \c ptr was zero and
   10.96 + *          SDL_False if it was not zero
   10.97 + *  
   10.98 + *  \param ptr Points to the value to be tested and set.
   10.99 + */
  10.100 +extern DECLSPEC SDL_bool SDLCALL SDL_AtomicTestThenSet32(volatile Uint32 * ptr);
  10.101 +
  10.102 +/**
  10.103 + *  \brief Set the value pointed to by \c ptr to be zero.
  10.104 + *  
  10.105 + *  \param ptr Address of the value to be set to zero
  10.106 + */
  10.107 +extern DECLSPEC void SDLCALL SDL_AtomicClear32(volatile Uint32 * ptr);
  10.108 +
  10.109 +/**
  10.110 + *  \brief Fetch the current value of \c *ptr and then increment that
  10.111 + *         value in place.
  10.112 + *  
  10.113 + *  \return The value before it was incremented.
  10.114 + *  
  10.115 + *  \param ptr Address of the value to fetch and increment
  10.116 + */
  10.117 +extern DECLSPEC Uint32 SDLCALL SDL_AtomicFetchThenIncrement32(volatile Uint32 * ptr);
  10.118 +
  10.119 +/**
  10.120 + *  \brief Fetch \c *ptr and then decrement the value in place.
  10.121 + *  
  10.122 + *  \return The value before it was decremented.
  10.123 + *  
  10.124 + *  \param ptr Address of the value to fetch and decrement
  10.125 + */
  10.126 +extern DECLSPEC Uint32 SDLCALL SDL_AtomicFetchThenDecrement32(volatile Uint32 * ptr);
  10.127 +
  10.128 +/**
  10.129 + *  \brief Fetch the current value at \c ptr and then add \c value to \c *ptr.
  10.130 + *  
  10.131 + *  \return \c *ptr before the addition took place.
  10.132 + *  
  10.133 + *  \param ptr The address of data we are changing.
  10.134 + *  \param value The value to add to \c *ptr. 
  10.135 + */
  10.136 +extern DECLSPEC Uint32 SDLCALL SDL_AtomicFetchThenAdd32(volatile Uint32 * ptr, Uint32 value);
  10.137 +
  10.138 +/**
  10.139 + *  \brief Fetch \c *ptr and then subtract \c value from it.
  10.140 + *  
  10.141 + *  \return \c *ptr before the subtraction took place.
  10.142 + *  
  10.143 + *  \param ptr The address of the data being changed.
  10.144 + *  \param value The value to subtract from \c *ptr.
  10.145 + */
  10.146 +extern DECLSPEC Uint32 SDLCALL SDL_AtomicFetchThenSubtract32(volatile Uint32 * ptr, Uint32 value);
  10.147 +
  10.148 +/**
  10.149 + *  \brief Add one to the data pointed to by \c ptr and return that value.
  10.150 + *  
  10.151 + *  \return The incremented value.
  10.152 + *  
  10.153 + *  \param ptr The address of the data to increment.
  10.154 + */
  10.155 +extern DECLSPEC Uint32 SDLCALL SDL_AtomicIncrementThenFetch32(volatile Uint32 * ptr);
  10.156 +
  10.157 +/**
  10.158 + *  \brief Subtract one from data pointed to by \c ptr and return the new value.
  10.159 + *  
  10.160 + *  \return The decremented value.
  10.161 + *  
  10.162 + *  \param ptr The address of the data to decrement.
  10.163 + */
  10.164 +extern DECLSPEC Uint32 SDLCALL SDL_AtomicDecrementThenFetch32(volatile Uint32 * ptr);
  10.165 +
  10.166 +/**
  10.167 + *  \brief Add \c value to the data pointed to by \c ptr and return result.
  10.168 + *  
  10.169 + *  \return The sum of \c *ptr and \c value.
  10.170 + *  
  10.171 + *  \param ptr The address of the data to be modified.
  10.172 + *  \param value The value to be added.
  10.173 + */
  10.174 +extern DECLSPEC Uint32 SDLCALL SDL_AtomicAddThenFetch32(volatile Uint32 * ptr, Uint32 value);
  10.175 +
  10.176 +/**
  10.177 + *  \brief Subtract \c value from the data pointed to by \c ptr and return the result.
  10.178 + *  
  10.179 + *  \return The difference between \c *ptr and \c value.
  10.180 + *  
  10.181 + *  \param ptr The address of the data to be modified.
  10.182 + *  \param value The value to be subtracted.
  10.183 + */
  10.184 +extern DECLSPEC Uint32 SDLCALL SDL_AtomicSubtractThenFetch32(volatile Uint32 * ptr, Uint32 value);
  10.185 +
  10.186 +/*@}*//*32 bit atomic operations*/
  10.187 +
  10.188 +/**
  10.189 + *  \name 64 bit atomic operations
  10.190 + */
  10.191 +/*@{*/
  10.192 +#ifdef SDL_HAS_64BIT_TYPE
  10.193 +
  10.194 +extern DECLSPEC SDL_bool SDLCALL SDL_AtomicTestThenSet64(volatile Uint64 * ptr);
  10.195 +extern DECLSPEC void SDLCALL SDL_AtomicClear64(volatile Uint64 * ptr);
  10.196 +extern DECLSPEC Uint64 SDLCALL SDL_AtomicFetchThenIncrement64(volatile Uint64 * ptr);
  10.197 +extern DECLSPEC Uint64 SDLCALL SDL_AtomicFetchThenDecrement64(volatile Uint64 * ptr);
  10.198 +extern DECLSPEC Uint64 SDLCALL SDL_AtomicFetchThenAdd64(volatile Uint64 * ptr, Uint64 value);
  10.199 +extern DECLSPEC Uint64 SDLCALL SDL_AtomicFetchThenSubtract64(volatile Uint64 * ptr, Uint64 value);
  10.200 +extern DECLSPEC Uint64 SDLCALL SDL_AtomicIncrementThenFetch64(volatile Uint64 * ptr);
  10.201 +extern DECLSPEC Uint64 SDLCALL SDL_AtomicDecrementThenFetch64(volatile Uint64 * ptr);
  10.202 +extern DECLSPEC Uint64 SDLCALL SDL_AtomicAddThenFetch64(volatile Uint64 * ptr, Uint64 value);
  10.203 +extern DECLSPEC Uint64 SDLCALL SDL_AtomicSubtractThenFetch64(volatile Uint64 * ptr, Uint64 value);
  10.204 +#endif /*  SDL_HAS_64BIT_TYPE */
  10.205 +
  10.206 +/*@}*//*64 bit atomic operations*/
  10.207 +
  10.208 +/* Ends C function definitions when using C++ */
  10.209 +#ifdef __cplusplus
  10.210 +/* *INDENT-OFF* */
  10.211 +}
  10.212 +/* *INDENT-ON* */
  10.213 +#endif
  10.214 +
  10.215 +#include "close_code.h"
  10.216 +
  10.217 +#endif /* _SDL_atomic_h_ */
  10.218 +
  10.219 +/* vi: set ts=4 sw=4 expandtab: */
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_audio.h	Sat Jul 31 01:24:50 2010 +0400
    11.3 @@ -0,0 +1,510 @@
    11.4 +/*
    11.5 +    SDL - Simple DirectMedia Layer
    11.6 +    Copyright (C) 1997-2010 Sam Lantinga
    11.7 +
    11.8 +    This library is free software; you can redistribute it and/or
    11.9 +    modify it under the terms of the GNU Lesser General Public
   11.10 +    License as published by the Free Software Foundation; either
   11.11 +    version 2.1 of the License, or (at your option) any later version.
   11.12 +
   11.13 +    This library is distributed in the hope that it will be useful,
   11.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   11.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   11.16 +    Lesser General Public License for more details.
   11.17 +
   11.18 +    You should have received a copy of the GNU Lesser General Public
   11.19 +    License along with this library; if not, write to the Free Software
   11.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   11.21 +
   11.22 +    Sam Lantinga
   11.23 +    slouken@libsdl.org
   11.24 +*/
   11.25 +
   11.26 +/**
   11.27 + *  \file SDL_audio.h
   11.28 + *  
   11.29 + *  Access to the raw audio mixing buffer for the SDL library.
   11.30 + */
   11.31 +
   11.32 +#ifndef _SDL_audio_h
   11.33 +#define _SDL_audio_h
   11.34 +
   11.35 +#include "SDL_stdinc.h"
   11.36 +#include "SDL_error.h"
   11.37 +#include "SDL_endian.h"
   11.38 +#include "SDL_mutex.h"
   11.39 +#include "SDL_thread.h"
   11.40 +#include "SDL_rwops.h"
   11.41 +
   11.42 +#include "begin_code.h"
   11.43 +/* Set up for C function definitions, even when using C++ */
   11.44 +#ifdef __cplusplus
   11.45 +/* *INDENT-OFF* */
   11.46 +extern "C" {
   11.47 +/* *INDENT-ON* */
   11.48 +#endif
   11.49 +
   11.50 +/**
   11.51 + *  \brief Audio format flags.
   11.52 + *  
   11.53 + *  These are what the 16 bits in SDL_AudioFormat currently mean...
   11.54 + *  (Unspecified bits are always zero).
   11.55 + *  
   11.56 + *  \verbatim
   11.57 +    ++-----------------------sample is signed if set
   11.58 +    ||
   11.59 +    ||       ++-----------sample is bigendian if set
   11.60 +    ||       ||
   11.61 +    ||       ||          ++---sample is float if set
   11.62 +    ||       ||          ||
   11.63 +    ||       ||          || +---sample bit size---+
   11.64 +    ||       ||          || |                     |
   11.65 +    15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
   11.66 +    \endverbatim
   11.67 + *  
   11.68 + *  There are macros in SDL 1.3 and later to query these bits.
   11.69 + */
   11.70 +typedef Uint16 SDL_AudioFormat;
   11.71 +
   11.72 +/**
   11.73 + *  \name Audio flags
   11.74 + */
   11.75 +/*@{*/
   11.76 +
   11.77 +#define SDL_AUDIO_MASK_BITSIZE       (0xFF)
   11.78 +#define SDL_AUDIO_MASK_DATATYPE      (1<<8)
   11.79 +#define SDL_AUDIO_MASK_ENDIAN        (1<<12)
   11.80 +#define SDL_AUDIO_MASK_SIGNED        (1<<15)
   11.81 +#define SDL_AUDIO_BITSIZE(x)         (x & SDL_AUDIO_MASK_BITSIZE)
   11.82 +#define SDL_AUDIO_ISFLOAT(x)         (x & SDL_AUDIO_MASK_DATATYPE)
   11.83 +#define SDL_AUDIO_ISBIGENDIAN(x)     (x & SDL_AUDIO_MASK_ENDIAN)
   11.84 +#define SDL_AUDIO_ISSIGNED(x)        (x & SDL_AUDIO_MASK_SIGNED)
   11.85 +#define SDL_AUDIO_ISINT(x)           (!SDL_AUDIO_ISFLOAT(x))
   11.86 +#define SDL_AUDIO_ISLITTLEENDIAN(x)  (!SDL_AUDIO_ISBIGENDIAN(x))
   11.87 +#define SDL_AUDIO_ISUNSIGNED(x)      (!SDL_AUDIO_ISSIGNED(x))
   11.88 +
   11.89 +/** 
   11.90 + *  \name Audio format flags
   11.91 + *
   11.92 + *  Defaults to LSB byte order.
   11.93 + */
   11.94 +/*@{*/
   11.95 +#define AUDIO_U8	0x0008  /**< Unsigned 8-bit samples */
   11.96 +#define AUDIO_S8	0x8008  /**< Signed 8-bit samples */
   11.97 +#define AUDIO_U16LSB	0x0010  /**< Unsigned 16-bit samples */
   11.98 +#define AUDIO_S16LSB	0x8010  /**< Signed 16-bit samples */
   11.99 +#define AUDIO_U16MSB	0x1010  /**< As above, but big-endian byte order */
  11.100 +#define AUDIO_S16MSB	0x9010  /**< As above, but big-endian byte order */
  11.101 +#define AUDIO_U16	AUDIO_U16LSB
  11.102 +#define AUDIO_S16	AUDIO_S16LSB
  11.103 +/*@}*/
  11.104 +
  11.105 +/**
  11.106 + *  \name int32 support
  11.107 + *  
  11.108 + *  New to SDL 1.3.
  11.109 + */
  11.110 +/*@{*/
  11.111 +#define AUDIO_S32LSB	0x8020  /**< 32-bit integer samples */
  11.112 +#define AUDIO_S32MSB	0x9020  /**< As above, but big-endian byte order */
  11.113 +#define AUDIO_S32	AUDIO_S32LSB
  11.114 +/*@}*/
  11.115 +
  11.116 +/**
  11.117 + *  \name float32 support
  11.118 + *  
  11.119 + *  New to SDL 1.3.
  11.120 + */
  11.121 +/*@{*/
  11.122 +#define AUDIO_F32LSB	0x8120  /**< 32-bit floating point samples */
  11.123 +#define AUDIO_F32MSB	0x9120  /**< As above, but big-endian byte order */
  11.124 +#define AUDIO_F32	AUDIO_F32LSB
  11.125 +/*@}*/
  11.126 +
  11.127 +/**
  11.128 + *  \name Native audio byte ordering
  11.129 + */
  11.130 +/*@{*/
  11.131 +#if SDL_BYTEORDER == SDL_LIL_ENDIAN
  11.132 +#define AUDIO_U16SYS	AUDIO_U16LSB
  11.133 +#define AUDIO_S16SYS	AUDIO_S16LSB
  11.134 +#define AUDIO_S32SYS	AUDIO_S32LSB
  11.135 +#define AUDIO_F32SYS	AUDIO_F32LSB
  11.136 +#else
  11.137 +#define AUDIO_U16SYS	AUDIO_U16MSB
  11.138 +#define AUDIO_S16SYS	AUDIO_S16MSB
  11.139 +#define AUDIO_S32SYS	AUDIO_S32MSB
  11.140 +#define AUDIO_F32SYS	AUDIO_F32MSB
  11.141 +#endif
  11.142 +/*@}*/
  11.143 +
  11.144 +/** 
  11.145 + *  \name Allow change flags
  11.146 + *  
  11.147 + *  Which audio format changes are allowed when opening a device.
  11.148 + */
  11.149 +/*@{*/
  11.150 +#define SDL_AUDIO_ALLOW_FREQUENCY_CHANGE    0x00000001
  11.151 +#define SDL_AUDIO_ALLOW_FORMAT_CHANGE       0x00000002
  11.152 +#define SDL_AUDIO_ALLOW_CHANNELS_CHANGE     0x00000004
  11.153 +#define SDL_AUDIO_ALLOW_ANY_CHANGE          (SDL_AUDIO_ALLOW_FREQUENCY_CHANGE|SDL_AUDIO_ALLOW_FORMAT_CHANGE|SDL_AUDIO_ALLOW_CHANNELS_CHANGE)
  11.154 +/*@}*/
  11.155 +
  11.156 +/*@}*//*Audio flags*/
  11.157 +
  11.158 +/**
  11.159 + *  This function is called when the audio device needs more data.
  11.160 + *
  11.161 + *  \param userdata An application-specific parameter saved in
  11.162 + *                  the SDL_AudioSpec structure
  11.163 + *  \param stream A pointer to the audio data buffer.
  11.164 + *  \param len    The length of that buffer in bytes.
  11.165 + *
  11.166 + *  Once the callback returns, the buffer will no longer be valid.
  11.167 + *  Stereo samples are stored in a LRLRLR ordering.
  11.168 + */
  11.169 +typedef void (SDLCALL * SDL_AudioCallback) (void *userdata, Uint8 * stream,
  11.170 +                                            int len);
  11.171 +
  11.172 +/**
  11.173 + *  The calculated values in this structure are calculated by SDL_OpenAudio().
  11.174 + */
  11.175 +typedef struct SDL_AudioSpec
  11.176 +{
  11.177 +    int freq;                   /**< DSP frequency -- samples per second */
  11.178 +    SDL_AudioFormat format;     /**< Audio data format */
  11.179 +    Uint8 channels;             /**< Number of channels: 1 mono, 2 stereo */
  11.180 +    Uint8 silence;              /**< Audio buffer silence value (calculated) */
  11.181 +    Uint16 samples;             /**< Audio buffer size in samples (power of 2) */
  11.182 +    Uint16 padding;             /**< Necessary for some compile environments */
  11.183 +    Uint32 size;                /**< Audio buffer size in bytes (calculated) */
  11.184 +    SDL_AudioCallback callback;
  11.185 +    void *userdata;
  11.186 +} SDL_AudioSpec;
  11.187 +
  11.188 +
  11.189 +struct SDL_AudioCVT;
  11.190 +typedef void (SDLCALL * SDL_AudioFilter) (struct SDL_AudioCVT * cvt,
  11.191 +                                          SDL_AudioFormat format);
  11.192 +
  11.193 +/**
  11.194 + *  A structure to hold a set of audio conversion filters and buffers.
  11.195 + */
  11.196 +typedef struct SDL_AudioCVT
  11.197 +{
  11.198 +    int needed;                 /**< Set to 1 if conversion possible */
  11.199 +    SDL_AudioFormat src_format; /**< Source audio format */
  11.200 +    SDL_AudioFormat dst_format; /**< Target audio format */
  11.201 +    double rate_incr;           /**< Rate conversion increment */
  11.202 +    Uint8 *buf;                 /**< Buffer to hold entire audio data */
  11.203 +    int len;                    /**< Length of original audio buffer */
  11.204 +    int len_cvt;                /**< Length of converted audio buffer */
  11.205 +    int len_mult;               /**< buffer must be len*len_mult big */
  11.206 +    double len_ratio;           /**< Given len, final size is len*len_ratio */
  11.207 +    SDL_AudioFilter filters[10];        /**< Filter list */
  11.208 +    int filter_index;           /**< Current audio conversion function */
  11.209 +} SDL_AudioCVT;
  11.210 +
  11.211 +
  11.212 +/* Function prototypes */
  11.213 +
  11.214 +/**
  11.215 + *  \name Driver discovery functions
  11.216 + *  
  11.217 + *  These functions return the list of built in audio drivers, in the
  11.218 + *  order that they are normally initialized by default.
  11.219 + */
  11.220 +/*@{*/
  11.221 +extern DECLSPEC int SDLCALL SDL_GetNumAudioDrivers(void);
  11.222 +extern DECLSPEC const char *SDLCALL SDL_GetAudioDriver(int index);
  11.223 +/*@}*/
  11.224 +
  11.225 +/**
  11.226 + *  \name Initialization and cleanup
  11.227 + *  
  11.228 + *  \internal These functions are used internally, and should not be used unless
  11.229 + *            you have a specific need to specify the audio driver you want to 
  11.230 + *            use.  You should normally use SDL_Init() or SDL_InitSubSystem().
  11.231 + */
  11.232 +/*@{*/
  11.233 +extern DECLSPEC int SDLCALL SDL_AudioInit(const char *driver_name);
  11.234 +extern DECLSPEC void SDLCALL SDL_AudioQuit(void);
  11.235 +/*@}*/
  11.236 +
  11.237 +/**
  11.238 + *  This function returns the name of the current audio driver, or NULL
  11.239 + *  if no driver has been initialized.
  11.240 + */
  11.241 +extern DECLSPEC const char *SDLCALL SDL_GetCurrentAudioDriver(void);
  11.242 +
  11.243 +/**
  11.244 + *  This function opens the audio device with the desired parameters, and
  11.245 + *  returns 0 if successful, placing the actual hardware parameters in the
  11.246 + *  structure pointed to by \c obtained.  If \c obtained is NULL, the audio
  11.247 + *  data passed to the callback function will be guaranteed to be in the
  11.248 + *  requested format, and will be automatically converted to the hardware
  11.249 + *  audio format if necessary.  This function returns -1 if it failed 
  11.250 + *  to open the audio device, or couldn't set up the audio thread.
  11.251 + *  
  11.252 + *  When filling in the desired audio spec structure,
  11.253 + *    - \c desired->freq should be the desired audio frequency in samples-per-
  11.254 + *      second.
  11.255 + *    - \c desired->format should be the desired audio format.
  11.256 + *    - \c desired->samples is the desired size of the audio buffer, in 
  11.257 + *      samples.  This number should be a power of two, and may be adjusted by 
  11.258 + *      the audio driver to a value more suitable for the hardware.  Good values
  11.259 + *      seem to range between 512 and 8096 inclusive, depending on the 
  11.260 + *      application and CPU speed.  Smaller values yield faster response time, 
  11.261 + *      but can lead to underflow if the application is doing heavy processing 
  11.262 + *      and cannot fill the audio buffer in time.  A stereo sample consists of 
  11.263 + *      both right and left channels in LR ordering.
  11.264 + *      Note that the number of samples is directly related to time by the
  11.265 + *      following formula:  \code ms = (samples*1000)/freq \endcode
  11.266 + *    - \c desired->size is the size in bytes of the audio buffer, and is
  11.267 + *      calculated by SDL_OpenAudio().
  11.268 + *    - \c desired->silence is the value used to set the buffer to silence,
  11.269 + *      and is calculated by SDL_OpenAudio().
  11.270 + *    - \c desired->callback should be set to a function that will be called
  11.271 + *      when the audio device is ready for more data.  It is passed a pointer
  11.272 + *      to the audio buffer, and the length in bytes of the audio buffer.
  11.273 + *      This function usually runs in a separate thread, and so you should
  11.274 + *      protect data structures that it accesses by calling SDL_LockAudio()
  11.275 + *      and SDL_UnlockAudio() in your code.
  11.276 + *    - \c desired->userdata is passed as the first parameter to your callback
  11.277 + *      function.
  11.278 + *  
  11.279 + *  The audio device starts out playing silence when it's opened, and should
  11.280 + *  be enabled for playing by calling \c SDL_PauseAudio(0) when you are ready
  11.281 + *  for your audio callback function to be called.  Since the audio driver
  11.282 + *  may modify the requested size of the audio buffer, you should allocate
  11.283 + *  any local mixing buffers after you open the audio device.
  11.284 + */
  11.285 +extern DECLSPEC int SDLCALL SDL_OpenAudio(SDL_AudioSpec * desired,
  11.286 +                                          SDL_AudioSpec * obtained);
  11.287 +
  11.288 +/**
  11.289 + *  SDL Audio Device IDs.
  11.290 + *  
  11.291 + *  A successful call to SDL_OpenAudio() is always device id 1, and legacy
  11.292 + *  SDL audio APIs assume you want this device ID. SDL_OpenAudioDevice() calls
  11.293 + *  always returns devices >= 2 on success. The legacy calls are good both
  11.294 + *  for backwards compatibility and when you don't care about multiple,
  11.295 + *  specific, or capture devices.
  11.296 + */
  11.297 +typedef Uint32 SDL_AudioDeviceID;
  11.298 +
  11.299 +/**
  11.300 + *  Get the number of available devices exposed by the current driver.
  11.301 + *  Only valid after a successfully initializing the audio subsystem.
  11.302 + *  Returns -1 if an explicit list of devices can't be determined; this is
  11.303 + *  not an error. For example, if SDL is set up to talk to a remote audio
  11.304 + *  server, it can't list every one available on the Internet, but it will
  11.305 + *  still allow a specific host to be specified to SDL_OpenAudioDevice().
  11.306 + *  
  11.307 + *  In many common cases, when this function returns a value <= 0, it can still
  11.308 + *  successfully open the default device (NULL for first argument of
  11.309 + *  SDL_OpenAudioDevice()).
  11.310 + */
  11.311 +extern DECLSPEC int SDLCALL SDL_GetNumAudioDevices(int iscapture);
  11.312 +
  11.313 +/**
  11.314 + *  Get the human-readable name of a specific audio device.
  11.315 + *  Must be a value between 0 and (number of audio devices-1).
  11.316 + *  Only valid after a successfully initializing the audio subsystem.
  11.317 + *  The values returned by this function reflect the latest call to
  11.318 + *  SDL_GetNumAudioDevices(); recall that function to redetect available
  11.319 + *  hardware.
  11.320 + *  
  11.321 + *  The string returned by this function is UTF-8 encoded, read-only, and
  11.322 + *  managed internally. You are not to free it. If you need to keep the
  11.323 + *  string for any length of time, you should make your own copy of it, as it
  11.324 + *  will be invalid next time any of several other SDL functions is called.
  11.325 + */
  11.326 +extern DECLSPEC const char *SDLCALL SDL_GetAudioDeviceName(int index,
  11.327 +                                                           int iscapture);
  11.328 +
  11.329 +
  11.330 +/**
  11.331 + *  Open a specific audio device. Passing in a device name of NULL requests
  11.332 + *  the most reasonable default (and is equivalent to calling SDL_OpenAudio()).
  11.333 + *  
  11.334 + *  The device name is a UTF-8 string reported by SDL_GetAudioDeviceName(), but
  11.335 + *  some drivers allow arbitrary and driver-specific strings, such as a
  11.336 + *  hostname/IP address for a remote audio server, or a filename in the
  11.337 + *  diskaudio driver.
  11.338 + *  
  11.339 + *  \return 0 on error, a valid device ID that is >= 2 on success.
  11.340 + *  
  11.341 + *  SDL_OpenAudio(), unlike this function, always acts on device ID 1.
  11.342 + */
  11.343 +extern DECLSPEC SDL_AudioDeviceID SDLCALL SDL_OpenAudioDevice(const char
  11.344 +                                                              *device,
  11.345 +                                                              int iscapture,
  11.346 +                                                              const
  11.347 +                                                              SDL_AudioSpec *
  11.348 +                                                              desired,
  11.349 +                                                              SDL_AudioSpec *
  11.350 +                                                              obtained,
  11.351 +                                                              int
  11.352 +                                                              allowed_changes);
  11.353 +
  11.354 +
  11.355 +
  11.356 +/**
  11.357 + *  \name Audio state
  11.358 + *  
  11.359 + *  Get the current audio state.
  11.360 + */
  11.361 +/*@{*/
  11.362 +typedef enum
  11.363 +{
  11.364 +    SDL_AUDIO_STOPPED = 0,
  11.365 +    SDL_AUDIO_PLAYING,
  11.366 +    SDL_AUDIO_PAUSED
  11.367 +} SDL_AudioStatus;
  11.368 +extern DECLSPEC SDL_AudioStatus SDLCALL SDL_GetAudioStatus(void);
  11.369 +
  11.370 +extern DECLSPEC SDL_AudioStatus SDLCALL
  11.371 +SDL_GetAudioDeviceStatus(SDL_AudioDeviceID dev);
  11.372 +/*@}*//*Audio State*/
  11.373 +
  11.374 +/**
  11.375 + *  \name Pause audio functions
  11.376 + *  
  11.377 + *  These functions pause and unpause the audio callback processing.
  11.378 + *  They should be called with a parameter of 0 after opening the audio
  11.379 + *  device to start playing sound.  This is so you can safely initialize
  11.380 + *  data for your callback function after opening the audio device.
  11.381 + *  Silence will be written to the audio device during the pause.
  11.382 + */
  11.383 +/*@{*/
  11.384 +extern DECLSPEC void SDLCALL SDL_PauseAudio(int pause_on);
  11.385 +extern DECLSPEC void SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID dev,
  11.386 +                                                  int pause_on);
  11.387 +/*@}*//*Pause audio functions*/
  11.388 +
  11.389 +/**
  11.390 + *  This function loads a WAVE from the data source, automatically freeing
  11.391 + *  that source if \c freesrc is non-zero.  For example, to load a WAVE file,
  11.392 + *  you could do:
  11.393 + *  \code
  11.394 + *  	SDL_LoadWAV_RW(SDL_RWFromFile("sample.wav", "rb"), 1, ...);
  11.395 + *  \endcode
  11.396 + *
  11.397 + *  If this function succeeds, it returns the given SDL_AudioSpec,
  11.398 + *  filled with the audio data format of the wave data, and sets
  11.399 + *  \c *audio_buf to a malloc()'d buffer containing the audio data,
  11.400 + *  and sets \c *audio_len to the length of that audio buffer, in bytes.
  11.401 + *  You need to free the audio buffer with SDL_FreeWAV() when you are 
  11.402 + *  done with it.
  11.403 + *
  11.404 + *  This function returns NULL and sets the SDL error message if the 
  11.405 + *  wave file cannot be opened, uses an unknown data format, or is 
  11.406 + *  corrupt.  Currently raw and MS-ADPCM WAVE files are supported.
  11.407 + */
  11.408 +extern DECLSPEC SDL_AudioSpec *SDLCALL SDL_LoadWAV_RW(SDL_RWops * src,
  11.409 +                                                      int freesrc,
  11.410 +                                                      SDL_AudioSpec * spec,
  11.411 +                                                      Uint8 ** audio_buf,
  11.412 +                                                      Uint32 * audio_len);
  11.413 +
  11.414 +/** 
  11.415 + *  Loads a WAV from a file.
  11.416 + *  Compatibility convenience function.
  11.417 + */
  11.418 +#define SDL_LoadWAV(file, spec, audio_buf, audio_len) \
  11.419 +	SDL_LoadWAV_RW(SDL_RWFromFile(file, "rb"),1, spec,audio_buf,audio_len)
  11.420 +
  11.421 +/**
  11.422 + *  This function frees data previously allocated with SDL_LoadWAV_RW()
  11.423 + */
  11.424 +extern DECLSPEC void SDLCALL SDL_FreeWAV(Uint8 * audio_buf);
  11.425 +
  11.426 +/**
  11.427 + *  This function takes a source format and rate and a destination format
  11.428 + *  and rate, and initializes the \c cvt structure with information needed
  11.429 + *  by SDL_ConvertAudio() to convert a buffer of audio data from one format
  11.430 + *  to the other.
  11.431 + *  
  11.432 + *  \return -1 if the format conversion is not supported, 0 if there's
  11.433 + *  no conversion needed, or 1 if the audio filter is set up.
  11.434 + */
  11.435 +extern DECLSPEC int SDLCALL SDL_BuildAudioCVT(SDL_AudioCVT * cvt,
  11.436 +                                              SDL_AudioFormat src_format,
  11.437 +                                              Uint8 src_channels,
  11.438 +                                              int src_rate,
  11.439 +                                              SDL_AudioFormat dst_format,
  11.440 +                                              Uint8 dst_channels,
  11.441 +                                              int dst_rate);
  11.442 +
  11.443 +/**
  11.444 + *  Once you have initialized the \c cvt structure using SDL_BuildAudioCVT(),
  11.445 + *  created an audio buffer \c cvt->buf, and filled it with \c cvt->len bytes of
  11.446 + *  audio data in the source format, this function will convert it in-place
  11.447 + *  to the desired format.
  11.448 + *  
  11.449 + *  The data conversion may expand the size of the audio data, so the buffer
  11.450 + *  \c cvt->buf should be allocated after the \c cvt structure is initialized by
  11.451 + *  SDL_BuildAudioCVT(), and should be \c cvt->len*cvt->len_mult bytes long.
  11.452 + */
  11.453 +extern DECLSPEC int SDLCALL SDL_ConvertAudio(SDL_AudioCVT * cvt);
  11.454 +
  11.455 +#define SDL_MIX_MAXVOLUME 128
  11.456 +/**
  11.457 + *  This takes two audio buffers of the playing audio format and mixes
  11.458 + *  them, performing addition, volume adjustment, and overflow clipping.
  11.459 + *  The volume ranges from 0 - 128, and should be set to ::SDL_MIX_MAXVOLUME
  11.460 + *  for full audio volume.  Note this does not change hardware volume.
  11.461 + *  This is provided for convenience -- you can mix your own audio data.
  11.462 + */
  11.463 +extern DECLSPEC void SDLCALL SDL_MixAudio(Uint8 * dst, const Uint8 * src,
  11.464 +                                          Uint32 len, int volume);
  11.465 +
  11.466 +/**
  11.467 + *  This works like SDL_MixAudio(), but you specify the audio format instead of
  11.468 + *  using the format of audio device 1. Thus it can be used when no audio
  11.469 + *  device is open at all.
  11.470 + */
  11.471 +extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst,
  11.472 +                                                const Uint8 * src,
  11.473 +                                                SDL_AudioFormat format,
  11.474 +                                                Uint32 len, int volume);
  11.475 +
  11.476 +/**
  11.477 + *  \name Audio lock functions
  11.478 + *  
  11.479 + *  The lock manipulated by these functions protects the callback function.
  11.480 + *  During a SDL_LockAudio()/SDL_UnlockAudio() pair, you can be guaranteed that 
  11.481 + *  the callback function is not running.  Do not call these from the callback
  11.482 + *  function or you will cause deadlock.
  11.483 + */
  11.484 +/*@{*/
  11.485 +extern DECLSPEC void SDLCALL SDL_LockAudio(void);
  11.486 +extern DECLSPEC void SDLCALL SDL_LockAudioDevice(SDL_AudioDeviceID dev);
  11.487 +extern DECLSPEC void SDLCALL SDL_UnlockAudio(void);
  11.488 +extern DECLSPEC void SDLCALL SDL_UnlockAudioDevice(SDL_AudioDeviceID dev);
  11.489 +/*@}*//*Audio lock functions*/
  11.490 +
  11.491 +/**
  11.492 + *  This function shuts down audio processing and closes the audio device.
  11.493 + */
  11.494 +extern DECLSPEC void SDLCALL SDL_CloseAudio(void);
  11.495 +extern DECLSPEC void SDLCALL SDL_CloseAudioDevice(SDL_AudioDeviceID dev);
  11.496 +
  11.497 +/**
  11.498 + * \return 1 if audio device is still functioning, zero if not, -1 on error.
  11.499 + */
  11.500 +extern DECLSPEC int SDLCALL SDL_AudioDeviceConnected(SDL_AudioDeviceID dev);
  11.501 +
  11.502 +
  11.503 +/* Ends C function definitions when using C++ */
  11.504 +#ifdef __cplusplus
  11.505 +/* *INDENT-OFF* */
  11.506 +}
  11.507 +/* *INDENT-ON* */
  11.508 +#endif
  11.509 +#include "close_code.h"
  11.510 +
  11.511 +#endif /* _SDL_audio_h */
  11.512 +
  11.513 +/* vi: set ts=4 sw=4 expandtab: */
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_clipboard.h	Sat Jul 31 01:24:50 2010 +0400
    12.3 @@ -0,0 +1,76 @@
    12.4 +/*
    12.5 +    SDL - Simple DirectMedia Layer
    12.6 +    Copyright (C) 1997-2010 Sam Lantinga
    12.7 +
    12.8 +    This library is free software; you can redistribute it and/or
    12.9 +    modify it under the terms of the GNU Lesser General Public
   12.10 +    License as published by the Free Software Foundation; either
   12.11 +    version 2.1 of the License, or (at your option) any later version.
   12.12 +
   12.13 +    This library is distributed in the hope that it will be useful,
   12.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   12.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   12.16 +    Lesser General Public License for more details.
   12.17 +
   12.18 +    You should have received a copy of the GNU Lesser General Public
   12.19 +    License along with this library; if not, write to the Free Software
   12.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   12.21 +
   12.22 +    Sam Lantinga
   12.23 +    slouken@libsdl.org
   12.24 +*/
   12.25 +
   12.26 +/**
   12.27 + * \file SDL_clipboard.h
   12.28 + *
   12.29 + * Include file for SDL clipboard handling
   12.30 + */
   12.31 +
   12.32 +#ifndef _SDL_clipboard_h
   12.33 +#define _SDL_clipboard_h
   12.34 +
   12.35 +#include "SDL_stdinc.h"
   12.36 +
   12.37 +#include "begin_code.h"
   12.38 +/* Set up for C function definitions, even when using C++ */
   12.39 +#ifdef __cplusplus
   12.40 +/* *INDENT-OFF* */
   12.41 +extern "C" {
   12.42 +/* *INDENT-ON* */
   12.43 +#endif
   12.44 +
   12.45 +/* Function prototypes */
   12.46 +
   12.47 +/**
   12.48 + * \brief Put UTF-8 text into the clipboard
   12.49 + *
   12.50 + * \sa SDL_GetClipboardText()
   12.51 + */
   12.52 +extern DECLSPEC int SDLCALL SDL_SetClipboardText(const char *text);
   12.53 +
   12.54 +/**
   12.55 + * \brief Get UTF-8 text from the clipboard, which must be freed with SDL_free()
   12.56 + *
   12.57 + * \sa SDL_SetClipboardText()
   12.58 + */
   12.59 +extern DECLSPEC char * SDLCALL SDL_GetClipboardText(void);
   12.60 +
   12.61 +/**
   12.62 + * \brief Returns whether the clipboard has text
   12.63 + *
   12.64 + * \sa SDL_GetClipboardText()
   12.65 + */
   12.66 +extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardText(void);
   12.67 +
   12.68 +
   12.69 +/* Ends C function definitions when using C++ */
   12.70 +#ifdef __cplusplus
   12.71 +/* *INDENT-OFF* */
   12.72 +}
   12.73 +/* *INDENT-ON* */
   12.74 +#endif
   12.75 +#include "close_code.h"
   12.76 +
   12.77 +#endif /* _SDL_clipboard_h */
   12.78 +
   12.79 +/* vi: set ts=4 sw=4 expandtab: */
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_compat.h	Sat Jul 31 01:24:50 2010 +0400
    13.3 @@ -0,0 +1,343 @@
    13.4 +/*
    13.5 +    SDL - Simple DirectMedia Layer
    13.6 +    Copyright (C) 1997-2010 Sam Lantinga
    13.7 +
    13.8 +    This library is free software; you can redistribute it and/or
    13.9 +    modify it under the terms of the GNU Lesser General Public
   13.10 +    License as published by the Free Software Foundation; either
   13.11 +    version 2.1 of the License, or (at your option) any later version.
   13.12 +
   13.13 +    This library is distributed in the hope that it will be useful,
   13.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   13.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   13.16 +    Lesser General Public License for more details.
   13.17 +
   13.18 +    You should have received a copy of the GNU Lesser General Public
   13.19 +    License along with this library; if not, write to the Free Software
   13.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   13.21 +
   13.22 +    Sam Lantinga
   13.23 +    slouken@libsdl.org
   13.24 +*/
   13.25 +
   13.26 + /**
   13.27 + *  \defgroup Compatibility SDL 1.2 Compatibility API
   13.28 + */
   13.29 +/*@{*/
   13.30 +
   13.31 +/**
   13.32 + *  \file SDL_compat.h
   13.33 + *
   13.34 + *  This file contains functions for backwards compatibility with SDL 1.2.
   13.35 + */
   13.36 +
   13.37 +/**
   13.38 + *  \def SDL_NO_COMPAT
   13.39 + *
   13.40 + *  #define SDL_NO_COMPAT to prevent SDL_compat.h from being included.
   13.41 + *  SDL_NO_COMPAT is intended to make it easier to covert SDL 1.2 code to
   13.42 + *  SDL 1.3/2.0.
   13.43 + */
   13.44 +
   13.45 + /*@}*/
   13.46 +
   13.47 +#ifdef SDL_NO_COMPAT
   13.48 +#define _SDL_compat_h
   13.49 +#endif
   13.50 +
   13.51 +#ifndef _SDL_compat_h
   13.52 +#define _SDL_compat_h
   13.53 +
   13.54 +#include "SDL_video.h"
   13.55 +#include "SDL_version.h"
   13.56 +
   13.57 +#include "begin_code.h"
   13.58 +/* Set up for C function definitions, even when using C++ */
   13.59 +#ifdef __cplusplus
   13.60 +/* *INDENT-OFF* */
   13.61 +extern "C" {
   13.62 +/* *INDENT-ON* */
   13.63 +#endif
   13.64 +
   13.65 +/**
   13.66 + *  \addtogroup Compatibility
   13.67 + */
   13.68 +/*@{*/
   13.69 +
   13.70 +/**
   13.71 + *  \name Surface flags
   13.72 + */
   13.73 +/*@{*/
   13.74 +#define SDL_SWSURFACE       0x00000000  /**< \note Not used */
   13.75 +#define SDL_SRCALPHA        0x00010000
   13.76 +#define SDL_SRCCOLORKEY     0x00020000
   13.77 +#define SDL_ANYFORMAT       0x00100000
   13.78 +#define SDL_HWPALETTE       0x00200000
   13.79 +#define SDL_DOUBLEBUF       0x00400000
   13.80 +#define SDL_FULLSCREEN      0x00800000
   13.81 +#define SDL_RESIZABLE       0x01000000
   13.82 +#define SDL_NOFRAME         0x02000000
   13.83 +#define SDL_OPENGL          0x04000000
   13.84 +#define SDL_HWSURFACE       0x08000001  /**< \note Not used */
   13.85 +#define SDL_ASYNCBLIT       0x08000000  /**< \note Not used */
   13.86 +#define SDL_RLEACCELOK      0x08000000  /**< \note Not used */
   13.87 +#define SDL_HWACCEL         0x08000000  /**< \note Not used */
   13.88 +/*@}*//*Surface flags*/
   13.89 +
   13.90 +#define SDL_APPMOUSEFOCUS	0x01
   13.91 +#define SDL_APPINPUTFOCUS	0x02
   13.92 +#define SDL_APPACTIVE		0x04
   13.93 +
   13.94 +#define SDL_LOGPAL 0x01
   13.95 +#define SDL_PHYSPAL 0x02
   13.96 +
   13.97 +#define SDL_ACTIVEEVENT	SDL_EVENT_COMPAT1
   13.98 +#define SDL_VIDEORESIZE	SDL_EVENT_COMPAT2
   13.99 +#define SDL_VIDEOEXPOSE	SDL_EVENT_COMPAT3
  13.100 +#define SDL_ACTIVEEVENTMASK	SDL_ACTIVEEVENT, SDL_ACTIVEEVENT
  13.101 +#define SDL_VIDEORESIZEMASK SDL_VIDEORESIZE, SDL_VIDEORESIZE
  13.102 +#define SDL_VIDEOEXPOSEMASK SDL_VIDEOEXPOSE, SDL_VIDEOEXPOSE
  13.103 +#define SDL_WINDOWEVENTMASK SDL_WINDOWEVENT, SDL_WINDOWEVENT
  13.104 +#define SDL_KEYDOWNMASK SDL_KEYDOWN, SDL_KEYDOWN
  13.105 +#define SDL_KEYUPMASK SDL_KEYUP, SDL_KEYUP
  13.106 +#define SDL_KEYEVENTMASK SDL_KEYDOWN, SDL_KEYUP
  13.107 +#define SDL_TEXTEDITINGMASK SDL_TEXTEDITING, SDL_TEXTEDITING
  13.108 +#define SDL_TEXTINPUTMASK SDL_TEXTINPUT, SDL_TEXTINPUT
  13.109 +#define SDL_MOUSEMOTIONMASK SDL_MOUSEMOTION, SDL_MOUSEMOTION
  13.110 +#define SDL_MOUSEBUTTONDOWNMASK SDL_MOUSEBUTTONDOWN, SDL_MOUSEBUTTONDOWN
  13.111 +#define SDL_MOUSEBUTTONUPMASK SDL_MOUSEBUTTONUP, SDL_MOUSEBUTTONUP
  13.112 +#define SDL_MOUSEWHEELMASK SDL_MOUSEWHEEL, SDL_MOUSEWHEEL
  13.113 +#define SDL_MOUSEEVENTMASK SDL_MOUSEMOTION, SDL_MOUSEBUTTONUP
  13.114 +#define SDL_JOYAXISMOTIONMASK SDL_JOYAXISMOTION, SDL_JOYAXISMOTION
  13.115 +#define SDL_JOYBALLMOTIONMASK SDL_JOYBALLMOTION, SDL_JOYBALLMOTION
  13.116 +#define SDL_JOYHATMOTIONMASK SDL_JOYHATMOTION, SDL_JOYHATMOTION
  13.117 +#define SDL_JOYBUTTONDOWNMASK SDL_JOYBUTTONDOWN, SDL_JOYBUTTONDOWN
  13.118 +#define SDL_JOYBUTTONUPMASK SDL_JOYBUTTONUP, SDL_JOYBUTTONUP
  13.119 +#define SDL_JOYEVENTMASK SDL_JOYAXISMOTION, SDL_JOYBUTTONUP
  13.120 +#define SDL_QUITMASK SDL_QUIT, SDL_QUIT
  13.121 +#define SDL_SYSWMEVENTMASK SDL_SYSWMEVENT, SDL_SYSWMEVENT
  13.122 +#define SDL_PROXIMITYINMASK SDL_PROXIMITYIN, SDL_PROXIMITYIN
  13.123 +#define SDL_PROXIMITYOUTMASK SDL_PROXIMITYOUT, SDL_PROXIMITYOUT
  13.124 +#define SDL_ALLEVENTS SDL_FIRSTEVENT, SDL_LASTEVENT
  13.125 +
  13.126 +#define SDL_BUTTON_WHEELUP	4
  13.127 +#define SDL_BUTTON_WHEELDOWN	5
  13.128 +
  13.129 +#define SDL_DEFAULT_REPEAT_DELAY	500
  13.130 +#define SDL_DEFAULT_REPEAT_INTERVAL	30
  13.131 +
  13.132 +typedef struct SDL_VideoInfo
  13.133 +{
  13.134 +    Uint32 hw_available:1;
  13.135 +    Uint32 wm_available:1;
  13.136 +    Uint32 UnusedBits1:6;
  13.137 +    Uint32 UnusedBits2:1;
  13.138 +    Uint32 blit_hw:1;
  13.139 +    Uint32 blit_hw_CC:1;
  13.140 +    Uint32 blit_hw_A:1;
  13.141 +    Uint32 blit_sw:1;
  13.142 +    Uint32 blit_sw_CC:1;
  13.143 +    Uint32 blit_sw_A:1;
  13.144 +    Uint32 blit_fill:1;
  13.145 +    Uint32 UnusedBits3:16;
  13.146 +    Uint32 video_mem;
  13.147 +
  13.148 +    SDL_PixelFormat *vfmt;
  13.149 +
  13.150 +    int current_w;
  13.151 +    int current_h;
  13.152 +} SDL_VideoInfo;
  13.153 +
  13.154 +/**
  13.155 + *  \name Overlay formats
  13.156 + *
  13.157 + *  The most common video overlay formats.
  13.158 + *  
  13.159 + *  For an explanation of these pixel formats, see:
  13.160 + *  http://www.webartz.com/fourcc/indexyuv.htm
  13.161 + *  
  13.162 + *  For information on the relationship between color spaces, see:
  13.163 + *  http://www.neuro.sfc.keio.ac.jp/~aly/polygon/info/color-space-faq.html
  13.164 + */
  13.165 +/*@{*/
  13.166 +#define SDL_YV12_OVERLAY  0x32315659    /**< Planar mode: Y + V + U  (3 planes) */
  13.167 +#define SDL_IYUV_OVERLAY  0x56555949    /**< Planar mode: Y + U + V  (3 planes) */
  13.168 +#define SDL_YUY2_OVERLAY  0x32595559    /**< Packed mode: Y0+U0+Y1+V0 (1 plane) */
  13.169 +#define SDL_UYVY_OVERLAY  0x59565955    /**< Packed mode: U0+Y0+V0+Y1 (1 plane) */
  13.170 +#define SDL_YVYU_OVERLAY  0x55595659    /**< Packed mode: Y0+V0+Y1+U0 (1 plane) */
  13.171 +/*@}*//*Overlay formats*/
  13.172 +
  13.173 +/**
  13.174 + *  The YUV hardware video overlay.
  13.175 + */
  13.176 +typedef struct SDL_Overlay
  13.177 +{
  13.178 +    Uint32 format;              /**< Read-only */
  13.179 +    int w, h;                   /**< Read-only */
  13.180 +    int planes;                 /**< Read-only */
  13.181 +    Uint16 *pitches;            /**< Read-only */
  13.182 +    Uint8 **pixels;             /**< Read-write */
  13.183 +
  13.184 +    /** 
  13.185 +     *  \name Hardware-specific surface info
  13.186 +     */
  13.187 +    /*@{*/
  13.188 +    struct private_yuvhwfuncs *hwfuncs;
  13.189 +    struct private_yuvhwdata *hwdata;
  13.190 +    /*@}*//*Hardware-specific surface info*/
  13.191 +
  13.192 +    /** 
  13.193 +     *  \name Special flags
  13.194 +     */
  13.195 +    /*@{*/
  13.196 +    Uint32 hw_overlay:1;        /**< Flag: This overlay hardware accelerated? */
  13.197 +    Uint32 UnusedBits:31;
  13.198 +    /*@}*//*Special flags*/
  13.199 +} SDL_Overlay;
  13.200 +
  13.201 +typedef enum
  13.202 +{
  13.203 +    SDL_GRAB_QUERY = -1,
  13.204 +    SDL_GRAB_OFF = 0,
  13.205 +    SDL_GRAB_ON = 1
  13.206 +} SDL_GrabMode;
  13.207 +
  13.208 +struct SDL_SysWMinfo;
  13.209 +
  13.210 +/**
  13.211 + *  \name Obsolete or renamed key codes
  13.212 + */
  13.213 +/*@{*/
  13.214 +
  13.215 +/** 
  13.216 + *  \name Renamed keys
  13.217 + *
  13.218 + *  These key constants were renamed for clarity or consistency. 
  13.219 + */
  13.220 +/*@{*/
  13.221 +#define SDLK_KP0 SDLK_KP_0
  13.222 +#define SDLK_KP1 SDLK_KP_1
  13.223 +#define SDLK_KP2 SDLK_KP_2
  13.224 +#define SDLK_KP3 SDLK_KP_3
  13.225 +#define SDLK_KP4 SDLK_KP_4
  13.226 +#define SDLK_KP5 SDLK_KP_5
  13.227 +#define SDLK_KP6 SDLK_KP_6
  13.228 +#define SDLK_KP7 SDLK_KP_7
  13.229 +#define SDLK_KP8 SDLK_KP_8
  13.230 +#define SDLK_KP9 SDLK_KP_9
  13.231 +#define SDLK_NUMLOCK SDLK_NUMLOCKCLEAR
  13.232 +#define SDLK_SCROLLOCK SDLK_SCROLLLOCK
  13.233 +#define SDLK_PRINT SDLK_PRINTSCREEN
  13.234 +#define SDLK_LMETA SDLK_LGUI
  13.235 +#define SDLK_RMETA SDLK_RGUI
  13.236 +/*@}*//*Renamed keys*/
  13.237 +
  13.238 +/**
  13.239 + *  \name META modifier
  13.240 + *  
  13.241 + *  The META modifier is equivalent to the GUI modifier from the USB standard.
  13.242 + */
  13.243 +/*@{*/
  13.244 +#define KMOD_LMETA KMOD_LGUI
  13.245 +#define KMOD_RMETA KMOD_RGUI
  13.246 +#define KMOD_META KMOD_GUI
  13.247 +/*@}*//*META modifier*/
  13.248 +
  13.249 +/** 
  13.250 + *  \name Not in USB
  13.251 + *
  13.252 + *  These keys don't appear in the USB specification (or at least not under 
  13.253 + *  those names). I'm unsure if the following assignments make sense or if these
  13.254 + *  codes should be defined as actual additional SDLK_ constants.
  13.255 + */
  13.256 +/*@{*/
  13.257 +#define SDLK_LSUPER SDLK_LMETA
  13.258 +#define SDLK_RSUPER SDLK_RMETA
  13.259 +#define SDLK_COMPOSE SDLK_APPLICATION
  13.260 +#define SDLK_BREAK SDLK_STOP
  13.261 +#define SDLK_EURO SDLK_2
  13.262 +/*@}*//*Not in USB*/
  13.263 +
  13.264 +/*@}*//*Obsolete or renamed key codes*/
  13.265 +
  13.266 +#define SDL_SetModuleHandle(x)
  13.267 +#define SDL_AllocSurface    SDL_CreateRGBSurface
  13.268 +
  13.269 +extern DECLSPEC const SDL_version *SDLCALL SDL_Linked_Version(void);
  13.270 +extern DECLSPEC char *SDLCALL SDL_AudioDriverName(char *namebuf, int maxlen);
  13.271 +extern DECLSPEC char *SDLCALL SDL_VideoDriverName(char *namebuf, int maxlen);
  13.272 +extern DECLSPEC const SDL_VideoInfo *SDLCALL SDL_GetVideoInfo(void);
  13.273 +extern DECLSPEC int SDLCALL SDL_VideoModeOK(int width,
  13.274 +                                            int height,
  13.275 +                                            int bpp, Uint32 flags);
  13.276 +extern DECLSPEC SDL_Rect **SDLCALL SDL_ListModes(const SDL_PixelFormat *
  13.277 +                                                 format, Uint32 flags);
  13.278 +extern DECLSPEC SDL_Surface *SDLCALL SDL_SetVideoMode(int width, int height,
  13.279 +                                                      int bpp, Uint32 flags);
  13.280 +extern DECLSPEC SDL_Surface *SDLCALL SDL_GetVideoSurface(void);
  13.281 +extern DECLSPEC void SDLCALL SDL_UpdateRects(SDL_Surface * screen,
  13.282 +                                             int numrects, SDL_Rect * rects);
  13.283 +extern DECLSPEC void SDLCALL SDL_UpdateRect(SDL_Surface * screen,
  13.284 +                                            Sint32 x,
  13.285 +                                            Sint32 y, Uint32 w, Uint32 h);
  13.286 +extern DECLSPEC int SDLCALL SDL_Flip(SDL_Surface * screen);
  13.287 +extern DECLSPEC int SDLCALL SDL_SetAlpha(SDL_Surface * surface,
  13.288 +                                         Uint32 flag, Uint8 alpha);
  13.289 +extern DECLSPEC SDL_Surface *SDLCALL SDL_DisplayFormat(SDL_Surface * surface);
  13.290 +extern DECLSPEC SDL_Surface *SDLCALL SDL_DisplayFormatAlpha(SDL_Surface *
  13.291 +                                                            surface);
  13.292 +extern DECLSPEC void SDLCALL SDL_WM_SetCaption(const char *title,
  13.293 +                                               const char *icon);
  13.294 +extern DECLSPEC void SDLCALL SDL_WM_GetCaption(const char **title,
  13.295 +                                               const char **icon);
  13.296 +extern DECLSPEC void SDLCALL SDL_WM_SetIcon(SDL_Surface * icon, Uint8 * mask);
  13.297 +extern DECLSPEC int SDLCALL SDL_WM_IconifyWindow(void);
  13.298 +extern DECLSPEC int SDLCALL SDL_WM_ToggleFullScreen(SDL_Surface * surface);
  13.299 +extern DECLSPEC SDL_GrabMode SDLCALL SDL_WM_GrabInput(SDL_GrabMode mode);
  13.300 +extern DECLSPEC int SDLCALL SDL_SetPalette(SDL_Surface * surface,
  13.301 +                                           int flags,
  13.302 +                                           const SDL_Color * colors,
  13.303 +                                           int firstcolor, int ncolors);
  13.304 +extern DECLSPEC int SDLCALL SDL_SetColors(SDL_Surface * surface,
  13.305 +                                          const SDL_Color * colors,
  13.306 +                                          int firstcolor, int ncolors);
  13.307 +extern DECLSPEC int SDLCALL SDL_GetWMInfo(struct SDL_SysWMinfo *info);
  13.308 +extern DECLSPEC Uint8 SDLCALL SDL_GetAppState(void);
  13.309 +extern DECLSPEC void SDLCALL SDL_WarpMouse(Uint16 x, Uint16 y);
  13.310 +extern DECLSPEC SDL_Overlay *SDLCALL SDL_CreateYUVOverlay(int width,
  13.311 +                                                          int height,
  13.312 +                                                          Uint32 format,
  13.313 +                                                          SDL_Surface *
  13.314 +                                                          display);
  13.315 +extern DECLSPEC int SDLCALL SDL_LockYUVOverlay(SDL_Overlay * overlay);
  13.316 +extern DECLSPEC void SDLCALL SDL_UnlockYUVOverlay(SDL_Overlay * overlay);
  13.317 +extern DECLSPEC int SDLCALL SDL_DisplayYUVOverlay(SDL_Overlay * overlay,
  13.318 +                                                  SDL_Rect * dstrect);
  13.319 +extern DECLSPEC void SDLCALL SDL_FreeYUVOverlay(SDL_Overlay * overlay);
  13.320 +extern DECLSPEC void SDLCALL SDL_GL_SwapBuffers(void);
  13.321 +extern DECLSPEC int SDLCALL SDL_EnableKeyRepeat(int delay, int interval);
  13.322 +extern DECLSPEC void SDLCALL SDL_GetKeyRepeat(int *delay, int *interval);
  13.323 +extern DECLSPEC int SDLCALL SDL_EnableUNICODE(int enable);
  13.324 +
  13.325 +#define SDL_TextureID SDL_Texture*
  13.326 +#define SDL_WindowID SDL_Window*
  13.327 +#define SDL_RenderPoint SDL_RenderDrawPoint
  13.328 +#define SDL_RenderLine SDL_RenderDrawLine
  13.329 +#define SDL_RenderFill(X)  (X) ? SDL_RenderFillRect(X) : SDL_RenderClear()
  13.330 +#define SDL_KillThread(X)
  13.331 +
  13.332 +extern DECLSPEC int SDLCALL SDL_putenv(const char *variable);
  13.333 +
  13.334 +/*@}*//*Compatibility*/
  13.335 +
  13.336 +/* Ends C function definitions when using C++ */
  13.337 +#ifdef __cplusplus
  13.338 +/* *INDENT-OFF* */
  13.339 +}
  13.340 +/* *INDENT-ON* */
  13.341 +#endif
  13.342 +#include "close_code.h"
  13.343 +
  13.344 +#endif /* _SDL_compat_h */
  13.345 +
  13.346 +/* vi: set ts=4 sw=4 expandtab: */
    14.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.2 +++ b/touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_config.h.default	Sat Jul 31 01:24:50 2010 +0400
    14.3 @@ -0,0 +1,47 @@
    14.4 +/*
    14.5 +    SDL - Simple DirectMedia Layer
    14.6 +    Copyright (C) 1997-2009 Sam Lantinga
    14.7 +
    14.8 +    This library is free software; you can redistribute it and/or
    14.9 +    modify it under the terms of the GNU Lesser General Public
   14.10 +    License as published by the Free Software Foundation; either
   14.11 +    version 2.1 of the License, or (at your option) any later version.
   14.12 +
   14.13 +    This library is distributed in the hope that it will be useful,
   14.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   14.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   14.16 +    Lesser General Public License for more details.
   14.17 +
   14.18 +    You should have received a copy of the GNU Lesser General Public
   14.19 +    License along with this library; if not, write to the Free Software
   14.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   14.21 +
   14.22 +    Sam Lantinga
   14.23 +    slouken@libsdl.org
   14.24 +*/
   14.25 +
   14.26 +#ifndef _SDL_config_h
   14.27 +#define _SDL_config_h
   14.28 +
   14.29 +#include "SDL_platform.h"
   14.30 +
   14.31 +/**
   14.32 + *  \file SDL_config.h.default
   14.33 + *
   14.34 + *  SDL_config.h for any platform that doesn't build using the configure system.
   14.35 + */
   14.36 + 
   14.37 +/* Add any platform that doesn't build using the configure system. */
   14.38 +#if defined(__NINTENDODS__)
   14.39 +#include "SDL_config_nintendods.h"
   14.40 +#elif defined(__IPHONEOS__) 
   14.41 +#include "SDL_config_iphoneos.h"
   14.42 +#elif defined(__MACOSX__)
   14.43 +#include "SDL_config_macosx.h"
   14.44 +#elif defined(__WIN32__)
   14.45 +#include "SDL_config_win32.h"
   14.46 +#else
   14.47 +#include "SDL_config_minimal.h"
   14.48 +#endif /* platform config */
   14.49 +
   14.50 +#endif /* _SDL_config_h */
    15.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.2 +++ b/touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_config.h.generated	Sat Jul 31 01:24:50 2010 +0400
    15.3 @@ -0,0 +1,313 @@
    15.4 +/* include/SDL_config.h.  Generated from SDL_config.h.in by configure.  */
    15.5 +/*
    15.6 +    SDL - Simple DirectMedia Layer
    15.7 +    Copyright (C) 1997-2009 Sam Lantinga
    15.8 +
    15.9 +    This library is free software; you can redistribute it and/or
   15.10 +    modify it under the terms of the GNU Lesser General Public
   15.11 +    License as published by the Free Software Foundation; either
   15.12 +    version 2.1 of the License, or (at your option) any later version.
   15.13 +
   15.14 +    This library is distributed in the hope that it will be useful,
   15.15 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   15.16 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   15.17 +    Lesser General Public License for more details.
   15.18 +
   15.19 +    You should have received a copy of the GNU Lesser General Public
   15.20 +    License along with this library; if not, write to the Free Software
   15.21 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   15.22 +
   15.23 +    Sam Lantinga
   15.24 +    slouken@libsdl.org
   15.25 +*/
   15.26 +
   15.27 +#ifndef _SDL_config_h
   15.28 +#define _SDL_config_h
   15.29 +
   15.30 +/**
   15.31 + *  \file SDL_config.h.in
   15.32 + *
   15.33 + *  This is a set of defines to configure the SDL features
   15.34 + */
   15.35 +
   15.36 +/* General platform specific identifiers */
   15.37 +#include "SDL_platform.h"
   15.38 +
   15.39 +/* Make sure that this isn't included by Visual C++ */
   15.40 +#ifdef _MSC_VER
   15.41 +#error You should copy include/SDL_config.h.default to include/SDL_config.h
   15.42 +#endif
   15.43 +
   15.44 +/* C language features */
   15.45 +/* #undef const */
   15.46 +/* #undef inline */
   15.47 +/* #undef volatile */
   15.48 +
   15.49 +/* C datatypes */
   15.50 +#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
   15.51 +/* #undef size_t */
   15.52 +/* #undef int8_t */
   15.53 +/* #undef uint8_t */
   15.54 +/* #undef int16_t */
   15.55 +/* #undef uint16_t */
   15.56 +/* #undef int32_t */
   15.57 +/* #undef uint32_t */
   15.58 +/* #undef int64_t */
   15.59 +/* #undef uint64_t */
   15.60 +/* #undef uintptr_t */
   15.61 +#endif /* !_STDINT_H_ && !HAVE_STDINT_H */
   15.62 +
   15.63 +#define SIZEOF_VOIDP 8
   15.64 +#define SDL_HAS_64BIT_TYPE 1
   15.65 +
   15.66 +/* Comment this if you want to build without any C library requirements */
   15.67 +#define HAVE_LIBC 1
   15.68 +#if HAVE_LIBC
   15.69 +
   15.70 +/* Useful headers */
   15.71 +#define HAVE_ALLOCA_H 1
   15.72 +#define HAVE_SYS_TYPES_H 1
   15.73 +#define HAVE_STDIO_H 1
   15.74 +#define STDC_HEADERS 1
   15.75 +#define HAVE_STDLIB_H 1
   15.76 +#define HAVE_STDARG_H 1
   15.77 +/* #undef HAVE_MALLOC_H */
   15.78 +#define HAVE_MEMORY_H 1
   15.79 +#define HAVE_STRING_H 1
   15.80 +#define HAVE_STRINGS_H 1
   15.81 +#define HAVE_INTTYPES_H 1
   15.82 +#define HAVE_STDINT_H 1
   15.83 +#define HAVE_CTYPE_H 1
   15.84 +#define HAVE_MATH_H 1
   15.85 +#define HAVE_ICONV_H 1
   15.86 +#define HAVE_SIGNAL_H 1
   15.87 +/* #undef HAVE_ALTIVEC_H */
   15.88 +
   15.89 +/* C library functions */
   15.90 +#define HAVE_MALLOC 1
   15.91 +#define HAVE_CALLOC 1
   15.92 +#define HAVE_REALLOC 1
   15.93 +#define HAVE_FREE 1
   15.94 +#define HAVE_ALLOCA 1
   15.95 +#ifndef _WIN32 /* Don't use C runtime versions of these on Windows */
   15.96 +#define HAVE_GETENV 1
   15.97 +#define HAVE_SETENV 1
   15.98 +#define HAVE_PUTENV 1
   15.99 +#define HAVE_UNSETENV 1
  15.100 +#endif
  15.101 +#define HAVE_QSORT 1
  15.102 +#define HAVE_ABS 1
  15.103 +#define HAVE_BCOPY 1
  15.104 +#define HAVE_MEMSET 1
  15.105 +#define HAVE_MEMCPY 1
  15.106 +#define HAVE_MEMMOVE 1
  15.107 +#define HAVE_MEMCMP 1
  15.108 +#define HAVE_STRLEN 1
  15.109 +#define HAVE_STRLCPY 1
  15.110 +#define HAVE_STRLCAT 1
  15.111 +#define HAVE_STRDUP 1
  15.112 +/* #undef HAVE__STRREV */
  15.113 +/* #undef HAVE__STRUPR */
  15.114 +/* #undef HAVE__STRLWR */
  15.115 +/* #undef HAVE_INDEX */
  15.116 +/* #undef HAVE_RINDEX */
  15.117 +#define HAVE_STRCHR 1
  15.118 +#define HAVE_STRRCHR 1
  15.119 +#define HAVE_STRSTR 1
  15.120 +/* #undef HAVE_ITOA */
  15.121 +/* #undef HAVE__LTOA */
  15.122 +/* #undef HAVE__UITOA */
  15.123 +/* #undef HAVE__ULTOA */
  15.124 +#define HAVE_STRTOL 1
  15.125 +#define HAVE_STRTOUL 1
  15.126 +/* #undef HAVE__I64TOA */
  15.127 +/* #undef HAVE__UI64TOA */
  15.128 +#define HAVE_STRTOLL 1
  15.129 +#define HAVE_STRTOULL 1
  15.130 +#define HAVE_STRTOD 1
  15.131 +#define HAVE_ATOI 1
  15.132 +#define HAVE_ATOF 1
  15.133 +#define HAVE_STRCMP 1
  15.134 +#define HAVE_STRNCMP 1
  15.135 +/* #undef HAVE__STRICMP */
  15.136 +#define HAVE_STRCASECMP 1
  15.137 +/* #undef HAVE__STRNICMP */
  15.138 +#define HAVE_STRNCASECMP 1
  15.139 +#define HAVE_SSCANF 1
  15.140 +#define HAVE_SNPRINTF 1
  15.141 +#define HAVE_VSNPRINTF 1
  15.142 +#define HAVE_M_PI 
  15.143 +#define HAVE_CEIL 1
  15.144 +#define HAVE_COPYSIGN 1
  15.145 +#define HAVE_COS 1
  15.146 +#define HAVE_COSF 1
  15.147 +#define HAVE_FABS 1
  15.148 +#define HAVE_FLOOR 1
  15.149 +#define HAVE_LOG 1
  15.150 +#define HAVE_POW 1
  15.151 +#define HAVE_SCALBN 1
  15.152 +#define HAVE_SIN 1
  15.153 +#define HAVE_SINF 1
  15.154 +#define HAVE_SQRT 1
  15.155 +#define HAVE_SIGACTION 1
  15.156 +#define HAVE_SETJMP 1
  15.157 +#define HAVE_NANOSLEEP 1
  15.158 +#define HAVE_SYSCONF 1
  15.159 +#define HAVE_SYSCTLBYNAME 1
  15.160 +/* #undef HAVE_CLOCK_GETTIME */
  15.161 +/* #undef HAVE_GETPAGESIZE */
  15.162 +#define HAVE_MPROTECT 1
  15.163 +
  15.164 +#else
  15.165 +/* We may need some replacement for stdarg.h here */
  15.166 +#include <stdarg.h>
  15.167 +#endif /* HAVE_LIBC */
  15.168 +
  15.169 +/* SDL internal assertion support */
  15.170 +/* #undef SDL_DEFAULT_ASSERT_LEVEL */
  15.171 +
  15.172 +/* Allow disabling of core subsystems */
  15.173 +/* #undef SDL_AUDIO_DISABLED */
  15.174 +/* #undef SDL_CPUINFO_DISABLED */
  15.175 +/* #undef SDL_EVENTS_DISABLED */
  15.176 +/* #undef SDL_FILE_DISABLED */
  15.177 +/* #undef SDL_JOYSTICK_DISABLED */
  15.178 +/* #undef SDL_HAPTIC_DISABLED */
  15.179 +/* #undef SDL_LOADSO_DISABLED */
  15.180 +/* #undef SDL_THREADS_DISABLED */
  15.181 +/* #undef SDL_TIMERS_DISABLED */
  15.182 +/* #undef SDL_VIDEO_DISABLED */
  15.183 +/* #undef SDL_POWER_DISABLED */
  15.184 +
  15.185 +/* Enable various audio drivers */
  15.186 +/* #undef SDL_AUDIO_DRIVER_ALSA */
  15.187 +/* #undef SDL_AUDIO_DRIVER_ALSA_DYNAMIC */
  15.188 +/* #undef SDL_AUDIO_DRIVER_ARTS */
  15.189 +/* #undef SDL_AUDIO_DRIVER_ARTS_DYNAMIC */
  15.190 +/* #undef SDL_AUDIO_DRIVER_PULSEAUDIO */
  15.191 +/* #undef SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC */
  15.192 +/* #undef SDL_AUDIO_DRIVER_BEOSAUDIO */
  15.193 +/* #undef SDL_AUDIO_DRIVER_BSD */
  15.194 +#define SDL_AUDIO_DRIVER_COREAUDIO 1
  15.195 +#define SDL_AUDIO_DRIVER_DISK 1
  15.196 +#define SDL_AUDIO_DRIVER_DUMMY 1
  15.197 +/* #undef SDL_AUDIO_DRIVER_DMEDIA */
  15.198 +/* #undef SDL_AUDIO_DRIVER_DSOUND */
  15.199 +/* #undef SDL_AUDIO_DRIVER_ESD */
  15.200 +/* #undef SDL_AUDIO_DRIVER_ESD_DYNAMIC */
  15.201 +/* #undef SDL_AUDIO_DRIVER_MMEAUDIO */
  15.202 +/* #undef SDL_AUDIO_DRIVER_NAS */
  15.203 +/* #undef SDL_AUDIO_DRIVER_NAS_DYNAMIC */
  15.204 +/* #undef SDL_AUDIO_DRIVER_NDS */
  15.205 +/* #undef SDL_AUDIO_DRIVER_OSS */
  15.206 +/* #undef SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H */
  15.207 +/* #undef SDL_AUDIO_DRIVER_PAUDIO */
  15.208 +/* #undef SDL_AUDIO_DRIVER_QSA */
  15.209 +/* #undef SDL_AUDIO_DRIVER_SUNAUDIO */
  15.210 +/* #undef SDL_AUDIO_DRIVER_WINWAVEOUT */
  15.211 +/* #undef SDL_AUDIO_DRIVER_FUSIONSOUND */
  15.212 +/* #undef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC */
  15.213 +
  15.214 +/* Enable various input drivers */
  15.215 +/* #undef SDL_INPUT_LINUXEV */
  15.216 +/* #undef SDL_INPUT_TSLIB */
  15.217 +/* #undef SDL_JOYSTICK_BEOS */
  15.218 +/* #undef SDL_JOYSTICK_DINPUT */
  15.219 +/* #undef SDL_JOYSTICK_DUMMY */
  15.220 +#define SDL_JOYSTICK_IOKIT 1
  15.221 +/* #undef SDL_JOYSTICK_LINUX */
  15.222 +/* #undef SDL_JOYSTICK_NDS */
  15.223 +/* #undef SDL_JOYSTICK_RISCOS */
  15.224 +/* #undef SDL_JOYSTICK_WINMM */
  15.225 +/* #undef SDL_JOYSTICK_USBHID */
  15.226 +/* #undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H */
  15.227 +/* #undef SDL_HAPTIC_DUMMY */
  15.228 +/* #undef SDL_HAPTIC_LINUX */
  15.229 +#define SDL_HAPTIC_IOKIT 1
  15.230 +/* #undef SDL_HAPTIC_DINPUT */
  15.231 +
  15.232 +/* Enable various shared object loading systems */
  15.233 +/* #undef SDL_LOADSO_BEOS */
  15.234 +/* #undef SDL_LOADSO_DLCOMPAT */
  15.235 +#define SDL_LOADSO_DLOPEN 1
  15.236 +/* #undef SDL_LOADSO_DUMMY */
  15.237 +/* #undef SDL_LOADSO_LDG */
  15.238 +/* #undef SDL_LOADSO_WIN32 */
  15.239 +
  15.240 +/* Enable various threading systems */
  15.241 +/* #undef SDL_THREAD_BEOS */
  15.242 +/* #undef SDL_THREAD_NDS */
  15.243 +#define SDL_THREAD_PTHREAD 1
  15.244 +#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1
  15.245 +/* #undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP */
  15.246 +/* #undef SDL_THREAD_SPROC */
  15.247 +/* #undef SDL_THREAD_WIN32 */
  15.248 +
  15.249 +/* Enable various timer systems */
  15.250 +/* #undef SDL_TIMER_BEOS */
  15.251 +/* #undef SDL_TIMER_DUMMY */
  15.252 +/* #undef SDL_TIMER_NDS */
  15.253 +/* #undef SDL_TIMER_RISCOS */
  15.254 +#define SDL_TIMER_UNIX 1
  15.255 +/* #undef SDL_TIMER_WIN32 */
  15.256 +/* #undef SDL_TIMER_WINCE */
  15.257 +
  15.258 +/* Enable various video drivers */
  15.259 +/* #undef SDL_VIDEO_DRIVER_BWINDOW */
  15.260 +#define SDL_VIDEO_DRIVER_COCOA 1
  15.261 +/* #undef SDL_VIDEO_DRIVER_DIRECTFB */
  15.262 +/* #undef SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC */
  15.263 +#define SDL_VIDEO_DRIVER_DUMMY 1
  15.264 +/* #undef SDL_VIDEO_DRIVER_FBCON */
  15.265 +/* #undef SDL_VIDEO_DRIVER_NDS */
  15.266 +/* #undef SDL_VIDEO_DRIVER_PHOTON */
  15.267 +/* #undef SDL_VIDEO_DRIVER_QNXGF */
  15.268 +/* #undef SDL_VIDEO_DRIVER_PS3 */
  15.269 +/* #undef SDL_VIDEO_DRIVER_RISCOS */
  15.270 +/* #undef SDL_VIDEO_DRIVER_SVGALIB */
  15.271 +/* #undef SDL_VIDEO_DRIVER_WIN32 */
  15.272 +#define SDL_VIDEO_DRIVER_X11 1
  15.273 +#define SDL_VIDEO_DRIVER_X11_DYNAMIC "/usr/X11R6/lib/libX11.6.dylib"
  15.274 +#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/usr/X11R6/lib/libXext.6.dylib"
  15.275 +#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/usr/X11R6/lib/libXrandr.2.dylib"
  15.276 +#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER "/usr/X11R6/lib/libXrender.1.dylib"
  15.277 +#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT "/usr/X11R6/lib/libXi.6.dylib"
  15.278 +#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/usr/X11R6/lib/libXss.6.dylib"
  15.279 +#define SDL_VIDEO_DRIVER_X11_VIDMODE 1
  15.280 +#define SDL_VIDEO_DRIVER_X11_XINERAMA 1
  15.281 +#define SDL_VIDEO_DRIVER_X11_XRANDR 1
  15.282 +#define SDL_VIDEO_DRIVER_X11_XINPUT 1
  15.283 +#define SDL_VIDEO_DRIVER_X11_SCRNSAVER 1
  15.284 +#define SDL_VIDEO_DRIVER_X11_XV 1
  15.285 +
  15.286 +/* #undef SDL_VIDEO_RENDER_D3D */
  15.287 +/* #undef SDL_VIDEO_RENDER_GDI */
  15.288 +#define SDL_VIDEO_RENDER_OGL 1
  15.289 +/* #undef SDL_VIDEO_RENDER_OGL_ES */
  15.290 +#define SDL_VIDEO_RENDER_X11 1
  15.291 +/* #undef SDL_VIDEO_RENDER_GAPI */
  15.292 +/* #undef SDL_VIDEO_RENDER_DDRAW */
  15.293 +
  15.294 +/* Enable OpenGL support */
  15.295 +#define SDL_VIDEO_OPENGL 1
  15.296 +/* #undef SDL_VIDEO_OPENGL_ES */
  15.297 +/* #undef SDL_VIDEO_OPENGL_BGL */
  15.298 +#define SDL_VIDEO_OPENGL_CGL 1
  15.299 +#define SDL_VIDEO_OPENGL_GLX 1
  15.300 +/* #undef SDL_VIDEO_OPENGL_WGL */
  15.301 +/* #undef SDL_VIDEO_OPENGL_OSMESA */
  15.302 +/* #undef SDL_VIDEO_OPENGL_OSMESA_DYNAMIC */
  15.303 +
  15.304 +/* Enable system power support */
  15.305 +/* #undef SDL_POWER_LINUX */
  15.306 +/* #undef SDL_POWER_WINDOWS */
  15.307 +#define SDL_POWER_MACOSX 1
  15.308 +/* #undef SDL_POWER_BEOS */
  15.309 +/* #undef SDL_POWER_NINTENDODS */
  15.310 +/* #undef SDL_POWER_HARDWIRED */
  15.311 +
  15.312 +/* Enable assembly routines */
  15.313 +#define SDL_ASSEMBLY_ROUTINES 1
  15.314 +/* #undef SDL_ALTIVEC_BLITTERS */
  15.315 +
  15.316 +#endif /* _SDL_config_h */
    16.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.2 +++ b/touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_config.h.in	Sat Jul 31 01:24:50 2010 +0400
    16.3 @@ -0,0 +1,312 @@
    16.4 +/*
    16.5 +    SDL - Simple DirectMedia Layer
    16.6 +    Copyright (C) 1997-2009 Sam Lantinga
    16.7 +
    16.8 +    This library is free software; you can redistribute it and/or
    16.9 +    modify it under the terms of the GNU Lesser General Public
   16.10 +    License as published by the Free Software Foundation; either
   16.11 +    version 2.1 of the License, or (at your option) any later version.
   16.12 +
   16.13 +    This library is distributed in the hope that it will be useful,
   16.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   16.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   16.16 +    Lesser General Public License for more details.
   16.17 +
   16.18 +    You should have received a copy of the GNU Lesser General Public
   16.19 +    License along with this library; if not, write to the Free Software
   16.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   16.21 +
   16.22 +    Sam Lantinga
   16.23 +    slouken@libsdl.org
   16.24 +*/
   16.25 +
   16.26 +#ifndef _SDL_config_h
   16.27 +#define _SDL_config_h
   16.28 +
   16.29 +/**
   16.30 + *  \file SDL_config.h.in
   16.31 + *
   16.32 + *  This is a set of defines to configure the SDL features
   16.33 + */
   16.34 +
   16.35 +/* General platform specific identifiers */
   16.36 +#include "SDL_platform.h"
   16.37 +
   16.38 +/* Make sure that this isn't included by Visual C++ */
   16.39 +#ifdef _MSC_VER
   16.40 +#error You should copy include/SDL_config.h.default to include/SDL_config.h
   16.41 +#endif
   16.42 +
   16.43 +/* C language features */
   16.44 +#undef const
   16.45 +#undef inline
   16.46 +#undef volatile
   16.47 +
   16.48 +/* C datatypes */
   16.49 +#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
   16.50 +#undef size_t
   16.51 +#undef int8_t
   16.52 +#undef uint8_t
   16.53 +#undef int16_t
   16.54 +#undef uint16_t
   16.55 +#undef int32_t
   16.56 +#undef uint32_t
   16.57 +#undef int64_t
   16.58 +#undef uint64_t
   16.59 +#undef uintptr_t
   16.60 +#endif /* !_STDINT_H_ && !HAVE_STDINT_H */
   16.61 +
   16.62 +#undef SIZEOF_VOIDP
   16.63 +#undef SDL_HAS_64BIT_TYPE
   16.64 +
   16.65 +/* Comment this if you want to build without any C library requirements */
   16.66 +#undef HAVE_LIBC
   16.67 +#if HAVE_LIBC
   16.68 +
   16.69 +/* Useful headers */
   16.70 +#undef HAVE_ALLOCA_H
   16.71 +#undef HAVE_SYS_TYPES_H
   16.72 +#undef HAVE_STDIO_H
   16.73 +#undef STDC_HEADERS
   16.74 +#undef HAVE_STDLIB_H
   16.75 +#undef HAVE_STDARG_H
   16.76 +#undef HAVE_MALLOC_H
   16.77 +#undef HAVE_MEMORY_H
   16.78 +#undef HAVE_STRING_H
   16.79 +#undef HAVE_STRINGS_H
   16.80 +#undef HAVE_INTTYPES_H
   16.81 +#undef HAVE_STDINT_H
   16.82 +#undef HAVE_CTYPE_H
   16.83 +#undef HAVE_MATH_H
   16.84 +#undef HAVE_ICONV_H
   16.85 +#undef HAVE_SIGNAL_H
   16.86 +#undef HAVE_ALTIVEC_H
   16.87 +
   16.88 +/* C library functions */
   16.89 +#undef HAVE_MALLOC
   16.90 +#undef HAVE_CALLOC
   16.91 +#undef HAVE_REALLOC
   16.92 +#undef HAVE_FREE
   16.93 +#undef HAVE_ALLOCA
   16.94 +#ifndef _WIN32 /* Don't use C runtime versions of these on Windows */
   16.95 +#undef HAVE_GETENV
   16.96 +#undef HAVE_SETENV
   16.97 +#undef HAVE_PUTENV
   16.98 +#undef HAVE_UNSETENV
   16.99 +#endif
  16.100 +#undef HAVE_QSORT
  16.101 +#undef HAVE_ABS
  16.102 +#undef HAVE_BCOPY
  16.103 +#undef HAVE_MEMSET
  16.104 +#undef HAVE_MEMCPY
  16.105 +#undef HAVE_MEMMOVE
  16.106 +#undef HAVE_MEMCMP
  16.107 +#undef HAVE_STRLEN
  16.108 +#undef HAVE_STRLCPY
  16.109 +#undef HAVE_STRLCAT
  16.110 +#undef HAVE_STRDUP
  16.111 +#undef HAVE__STRREV
  16.112 +#undef HAVE__STRUPR
  16.113 +#undef HAVE__STRLWR
  16.114 +#undef HAVE_INDEX
  16.115 +#undef HAVE_RINDEX
  16.116 +#undef HAVE_STRCHR
  16.117 +#undef HAVE_STRRCHR
  16.118 +#undef HAVE_STRSTR
  16.119 +#undef HAVE_ITOA
  16.120 +#undef HAVE__LTOA
  16.121 +#undef HAVE__UITOA
  16.122 +#undef HAVE__ULTOA
  16.123 +#undef HAVE_STRTOL
  16.124 +#undef HAVE_STRTOUL
  16.125 +#undef HAVE__I64TOA
  16.126 +#undef HAVE__UI64TOA
  16.127 +#undef HAVE_STRTOLL
  16.128 +#undef HAVE_STRTOULL
  16.129 +#undef HAVE_STRTOD
  16.130 +#undef HAVE_ATOI
  16.131 +#undef HAVE_ATOF
  16.132 +#undef HAVE_STRCMP
  16.133 +#undef HAVE_STRNCMP
  16.134 +#undef HAVE__STRICMP
  16.135 +#undef HAVE_STRCASECMP
  16.136 +#undef HAVE__STRNICMP
  16.137 +#undef HAVE_STRNCASECMP
  16.138 +#undef HAVE_SSCANF
  16.139 +#undef HAVE_SNPRINTF
  16.140 +#undef HAVE_VSNPRINTF
  16.141 +#undef HAVE_M_PI
  16.142 +#undef HAVE_CEIL
  16.143 +#undef HAVE_COPYSIGN
  16.144 +#undef HAVE_COS
  16.145 +#undef HAVE_COSF
  16.146 +#undef HAVE_FABS
  16.147 +#undef HAVE_FLOOR
  16.148 +#undef HAVE_LOG
  16.149 +#undef HAVE_POW
  16.150 +#undef HAVE_SCALBN
  16.151 +#undef HAVE_SIN
  16.152 +#undef HAVE_SINF
  16.153 +#undef HAVE_SQRT
  16.154 +#undef HAVE_SIGACTION
  16.155 +#undef HAVE_SETJMP
  16.156 +#undef HAVE_NANOSLEEP
  16.157 +#undef HAVE_SYSCONF
  16.158 +#undef HAVE_SYSCTLBYNAME
  16.159 +#undef HAVE_CLOCK_GETTIME
  16.160 +#undef HAVE_GETPAGESIZE
  16.161 +#undef HAVE_MPROTECT
  16.162 +
  16.163 +#else
  16.164 +/* We may need some replacement for stdarg.h here */
  16.165 +#include <stdarg.h>
  16.166 +#endif /* HAVE_LIBC */
  16.167 +
  16.168 +/* SDL internal assertion support */
  16.169 +#undef SDL_DEFAULT_ASSERT_LEVEL
  16.170 +
  16.171 +/* Allow disabling of core subsystems */
  16.172 +#undef SDL_AUDIO_DISABLED
  16.173 +#undef SDL_CPUINFO_DISABLED
  16.174 +#undef SDL_EVENTS_DISABLED
  16.175 +#undef SDL_FILE_DISABLED
  16.176 +#undef SDL_JOYSTICK_DISABLED
  16.177 +#undef SDL_HAPTIC_DISABLED
  16.178 +#undef SDL_LOADSO_DISABLED
  16.179 +#undef SDL_THREADS_DISABLED
  16.180 +#undef SDL_TIMERS_DISABLED
  16.181 +#undef SDL_VIDEO_DISABLED
  16.182 +#undef SDL_POWER_DISABLED
  16.183 +
  16.184 +/* Enable various audio drivers */
  16.185 +#undef SDL_AUDIO_DRIVER_ALSA
  16.186 +#undef SDL_AUDIO_DRIVER_ALSA_DYNAMIC
  16.187 +#undef SDL_AUDIO_DRIVER_ARTS
  16.188 +#undef SDL_AUDIO_DRIVER_ARTS_DYNAMIC
  16.189 +#undef SDL_AUDIO_DRIVER_PULSEAUDIO
  16.190 +#undef SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC
  16.191 +#undef SDL_AUDIO_DRIVER_BEOSAUDIO
  16.192 +#undef SDL_AUDIO_DRIVER_BSD
  16.193 +#undef SDL_AUDIO_DRIVER_COREAUDIO
  16.194 +#undef SDL_AUDIO_DRIVER_DISK
  16.195 +#undef SDL_AUDIO_DRIVER_DUMMY
  16.196 +#undef SDL_AUDIO_DRIVER_DMEDIA
  16.197 +#undef SDL_AUDIO_DRIVER_DSOUND
  16.198 +#undef SDL_AUDIO_DRIVER_ESD
  16.199 +#undef SDL_AUDIO_DRIVER_ESD_DYNAMIC
  16.200 +#undef SDL_AUDIO_DRIVER_MMEAUDIO
  16.201 +#undef SDL_AUDIO_DRIVER_NAS
  16.202 +#undef SDL_AUDIO_DRIVER_NAS_DYNAMIC
  16.203 +#undef SDL_AUDIO_DRIVER_NDS
  16.204 +#undef SDL_AUDIO_DRIVER_OSS
  16.205 +#undef SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H
  16.206 +#undef SDL_AUDIO_DRIVER_PAUDIO
  16.207 +#undef SDL_AUDIO_DRIVER_QSA
  16.208 +#undef SDL_AUDIO_DRIVER_SUNAUDIO
  16.209 +#undef SDL_AUDIO_DRIVER_WINWAVEOUT
  16.210 +#undef SDL_AUDIO_DRIVER_FUSIONSOUND
  16.211 +#undef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC
  16.212 +
  16.213 +/* Enable various input drivers */
  16.214 +#undef SDL_INPUT_LINUXEV
  16.215 +#undef SDL_INPUT_TSLIB
  16.216 +#undef SDL_JOYSTICK_BEOS
  16.217 +#undef SDL_JOYSTICK_DINPUT
  16.218 +#undef SDL_JOYSTICK_DUMMY
  16.219 +#undef SDL_JOYSTICK_IOKIT
  16.220 +#undef SDL_JOYSTICK_LINUX
  16.221 +#undef SDL_JOYSTICK_NDS
  16.222 +#undef SDL_JOYSTICK_RISCOS
  16.223 +#undef SDL_JOYSTICK_WINMM
  16.224 +#undef SDL_JOYSTICK_USBHID
  16.225 +#undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H
  16.226 +#undef SDL_HAPTIC_DUMMY
  16.227 +#undef SDL_HAPTIC_LINUX
  16.228 +#undef SDL_HAPTIC_IOKIT
  16.229 +#undef SDL_HAPTIC_DINPUT
  16.230 +
  16.231 +/* Enable various shared object loading systems */
  16.232 +#undef SDL_LOADSO_BEOS
  16.233 +#undef SDL_LOADSO_DLCOMPAT
  16.234 +#undef SDL_LOADSO_DLOPEN
  16.235 +#undef SDL_LOADSO_DUMMY
  16.236 +#undef SDL_LOADSO_LDG
  16.237 +#undef SDL_LOADSO_WIN32
  16.238 +
  16.239 +/* Enable various threading systems */
  16.240 +#undef SDL_THREAD_BEOS
  16.241 +#undef SDL_THREAD_NDS
  16.242 +#undef SDL_THREAD_PTHREAD
  16.243 +#undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX
  16.244 +#undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP
  16.245 +#undef SDL_THREAD_SPROC
  16.246 +#undef SDL_THREAD_WIN32
  16.247 +
  16.248 +/* Enable various timer systems */
  16.249 +#undef SDL_TIMER_BEOS
  16.250 +#undef SDL_TIMER_DUMMY
  16.251 +#undef SDL_TIMER_NDS
  16.252 +#undef SDL_TIMER_RISCOS
  16.253 +#undef SDL_TIMER_UNIX
  16.254 +#undef SDL_TIMER_WIN32
  16.255 +#undef SDL_TIMER_WINCE
  16.256 +
  16.257 +/* Enable various video drivers */
  16.258 +#undef SDL_VIDEO_DRIVER_BWINDOW
  16.259 +#undef SDL_VIDEO_DRIVER_COCOA
  16.260 +#undef SDL_VIDEO_DRIVER_DIRECTFB
  16.261 +#undef SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC
  16.262 +#undef SDL_VIDEO_DRIVER_DUMMY
  16.263 +#undef SDL_VIDEO_DRIVER_FBCON
  16.264 +#undef SDL_VIDEO_DRIVER_NDS
  16.265 +#undef SDL_VIDEO_DRIVER_PHOTON
  16.266 +#undef SDL_VIDEO_DRIVER_QNXGF
  16.267 +#undef SDL_VIDEO_DRIVER_PS3
  16.268 +#undef SDL_VIDEO_DRIVER_RISCOS
  16.269 +#undef SDL_VIDEO_DRIVER_SVGALIB
  16.270 +#undef SDL_VIDEO_DRIVER_WIN32
  16.271 +#undef SDL_VIDEO_DRIVER_X11
  16.272 +#undef SDL_VIDEO_DRIVER_X11_DYNAMIC
  16.273 +#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT
  16.274 +#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR
  16.275 +#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER
  16.276 +#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT
  16.277 +#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS
  16.278 +#undef SDL_VIDEO_DRIVER_X11_VIDMODE
  16.279 +#undef SDL_VIDEO_DRIVER_X11_XINERAMA
  16.280 +#undef SDL_VIDEO_DRIVER_X11_XRANDR
  16.281 +#undef SDL_VIDEO_DRIVER_X11_XINPUT
  16.282 +#undef SDL_VIDEO_DRIVER_X11_SCRNSAVER
  16.283 +#undef SDL_VIDEO_DRIVER_X11_XV
  16.284 +
  16.285 +#undef SDL_VIDEO_RENDER_D3D
  16.286 +#undef SDL_VIDEO_RENDER_GDI
  16.287 +#undef SDL_VIDEO_RENDER_OGL
  16.288 +#undef SDL_VIDEO_RENDER_OGL_ES
  16.289 +#undef SDL_VIDEO_RENDER_X11
  16.290 +#undef SDL_VIDEO_RENDER_GAPI
  16.291 +#undef SDL_VIDEO_RENDER_DDRAW
  16.292 +
  16.293 +/* Enable OpenGL support */
  16.294 +#undef SDL_VIDEO_OPENGL
  16.295 +#undef SDL_VIDEO_OPENGL_ES
  16.296 +#undef SDL_VIDEO_OPENGL_BGL
  16.297 +#undef SDL_VIDEO_OPENGL_CGL
  16.298 +#undef SDL_VIDEO_OPENGL_GLX
  16.299 +#undef SDL_VIDEO_OPENGL_WGL
  16.300 +#undef SDL_VIDEO_OPENGL_OSMESA
  16.301 +#undef SDL_VIDEO_OPENGL_OSMESA_DYNAMIC
  16.302 +
  16.303 +/* Enable system power support */
  16.304 +#undef SDL_POWER_LINUX
  16.305 +#undef SDL_POWER_WINDOWS
  16.306 +#undef SDL_POWER_MACOSX
  16.307 +#undef SDL_POWER_BEOS
  16.308 +#undef SDL_POWER_NINTENDODS
  16.309 +#undef SDL_POWER_HARDWIRED
  16.310 +
  16.311 +/* Enable assembly routines */
  16.312 +#undef SDL_ASSEMBLY_ROUTINES
  16.313 +#undef SDL_ALTIVEC_BLITTERS
  16.314 +
  16.315 +#endif /* _SDL_config_h */
    17.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.2 +++ b/touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_config_iphoneos.h	Sat Jul 31 01:24:50 2010 +0400
    17.3 @@ -0,0 +1,155 @@
    17.4 +/*
    17.5 +    SDL - Simple DirectMedia Layer
    17.6 +    Copyright (C) 1997-2010 Sam Lantinga
    17.7 +
    17.8 +    This library is free software; you can redistribute it and/or
    17.9 +    modify it under the terms of the GNU Lesser General Public
   17.10 +    License as published by the Free Software Foundation; either
   17.11 +    version 2.1 of the License, or (at your option) any later version.
   17.12 +
   17.13 +    This library is distributed in the hope that it will be useful,
   17.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   17.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   17.16 +    Lesser General Public License for more details.
   17.17 +
   17.18 +    You should have received a copy of the GNU Lesser General Public
   17.19 +    License along with this library; if not, write to the Free Software
   17.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   17.21 +
   17.22 +    Sam Lantinga
   17.23 +    slouken@libsdl.org
   17.24 +*/
   17.25 +
   17.26 +#ifndef _SDL_config_iphoneos_h
   17.27 +#define _SDL_config_iphoneos_h
   17.28 +
   17.29 +#include "SDL_platform.h"
   17.30 +
   17.31 +#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
   17.32 +typedef signed char int8_t;
   17.33 +typedef unsigned char uint8_t;
   17.34 +typedef signed short int16_t;
   17.35 +typedef unsigned short uint16_t;
   17.36 +typedef signed int int32_t;
   17.37 +typedef unsigned int uint32_t;
   17.38 +typedef unsigned long uintptr_t;
   17.39 +#endif /* !_STDINT_H_ && !HAVE_STDINT_H */
   17.40 +
   17.41 +#ifdef __LP64__
   17.42 +#define SIZEOF_VOIDP 8
   17.43 +#else
   17.44 +#define SIZEOF_VOIDP 4
   17.45 +#endif
   17.46 +
   17.47 +#define SDL_HAS_64BIT_TYPE	1
   17.48 +
   17.49 +#define HAVE_ALLOCA_H		1
   17.50 +#define HAVE_SYS_TYPES_H	1
   17.51 +#define HAVE_STDIO_H	1
   17.52 +#define STDC_HEADERS	1
   17.53 +#define HAVE_STRING_H	1
   17.54 +#define HAVE_INTTYPES_H	1
   17.55 +#define HAVE_STDINT_H	1
   17.56 +#define HAVE_CTYPE_H	1
   17.57 +#define HAVE_MATH_H	1
   17.58 +#define HAVE_SIGNAL_H	1
   17.59 +
   17.60 +/* C library functions */
   17.61 +#define HAVE_MALLOC	1
   17.62 +#define HAVE_CALLOC	1
   17.63 +#define HAVE_REALLOC	1
   17.64 +#define HAVE_FREE	1
   17.65 +#define HAVE_ALLOCA	1
   17.66 +#define HAVE_GETENV	1
   17.67 +#define HAVE_SETENV	1
   17.68 +#define HAVE_PUTENV	1
   17.69 +#define HAVE_SETENV	1
   17.70 +#define HAVE_UNSETENV	1
   17.71 +#define HAVE_QSORT	1
   17.72 +#define HAVE_ABS	1
   17.73 +#define HAVE_BCOPY	1
   17.74 +#define HAVE_MEMSET	1
   17.75 +#define HAVE_MEMCPY	1
   17.76 +#define HAVE_MEMMOVE	1
   17.77 +#define HAVE_MEMCMP	1
   17.78 +#define HAVE_STRLEN	1
   17.79 +#define HAVE_STRLCPY	1
   17.80 +#define HAVE_STRLCAT	1
   17.81 +#define HAVE_STRDUP	1
   17.82 +#define HAVE_STRCHR	1
   17.83 +#define HAVE_STRRCHR	1
   17.84 +#define HAVE_STRSTR	1
   17.85 +#define HAVE_STRTOL	1
   17.86 +#define HAVE_STRTOUL	1
   17.87 +#define HAVE_STRTOLL	1
   17.88 +#define HAVE_STRTOULL	1
   17.89 +#define HAVE_STRTOD	1
   17.90 +#define HAVE_ATOI	1
   17.91 +#define HAVE_ATOF	1
   17.92 +#define HAVE_STRCMP	1
   17.93 +#define HAVE_STRNCMP	1
   17.94 +#define HAVE_STRCASECMP	1
   17.95 +#define HAVE_STRNCASECMP 1
   17.96 +#define HAVE_SSCANF	1
   17.97 +#define HAVE_SNPRINTF	1
   17.98 +#define HAVE_VSNPRINTF	1
   17.99 +#define HAVE_CEIL	1
  17.100 +#define HAVE_COPYSIGN	1
  17.101 +#define HAVE_COS	1
  17.102 +#define HAVE_COSF	1
  17.103 +#define HAVE_FABS	1
  17.104 +#define HAVE_FLOOR	1
  17.105 +#define HAVE_LOG	1
  17.106 +#define HAVE_POW	1
  17.107 +#define HAVE_SCALBN	1
  17.108 +#define HAVE_SIN	1
  17.109 +#define HAVE_SINF	1
  17.110 +#define HAVE_SQRT	1
  17.111 +#define HAVE_SIGACTION	1
  17.112 +#define HAVE_SETJMP	1
  17.113 +#define HAVE_NANOSLEEP	1
  17.114 +#define HAVE_SYSCONF	1
  17.115 +#define HAVE_SYSCTLBYNAME 1
  17.116 +
  17.117 +/* enable iPhone version of Core Audio driver */
  17.118 +#define SDL_AUDIO_DRIVER_COREAUDIOIPHONE 1
  17.119 +/* Enable the dummy audio driver (src/audio/dummy/\*.c) */
  17.120 +#define SDL_AUDIO_DRIVER_DUMMY	1
  17.121 +
  17.122 +/* Enable the stub haptic driver (src/haptic/dummy/\*.c) */
  17.123 +#define SDL_HAPTIC_DISABLED	1
  17.124 +
  17.125 +/* Enable Unix style SO loading */
  17.126 +/* Technically this works, but it violates the iPhone developer agreement */
  17.127 +/* #define SDL_LOADSO_DLOPEN 1 */
  17.128 +
  17.129 +/* Enable the stub shared object loader (src/loadso/dummy/\*.c) */
  17.130 +#define SDL_LOADSO_DISABLED	1
  17.131 +
  17.132 +/* Enable various threading systems */
  17.133 +#define SDL_THREAD_PTHREAD	1
  17.134 +#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX	1
  17.135 +
  17.136 +/* Enable various timer systems */
  17.137 +#define SDL_TIMER_UNIX	1
  17.138 +
  17.139 +/* Supported video drivers */
  17.140 +#define SDL_VIDEO_DRIVER_UIKIT	1
  17.141 +#define SDL_VIDEO_DRIVER_DUMMY	1
  17.142 +
  17.143 +/* enable OpenGL ES */
  17.144 +#define SDL_VIDEO_OPENGL_ES	1
  17.145 +#define SDL_VIDEO_RENDER_OGL_ES	1
  17.146 +
  17.147 +/* Enable system power support */
  17.148 +#define SDL_POWER_UIKIT 1
  17.149 +
  17.150 +/* enable iPhone keyboard support */
  17.151 +#define SDL_IPHONE_KEYBOARD 1
  17.152 +
  17.153 +/* Set max recognized G-force from accelerometer
  17.154 +   See src/joystick/uikit/SDLUIAccelerationDelegate.m for notes on why this is needed
  17.155 + */
  17.156 +#define SDL_IPHONE_MAX_GFORCE 5.0
  17.157 +
  17.158 +#endif /* _SDL_config_iphoneos_h */
    18.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.2 +++ b/touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_config_macosx.h	Sat Jul 31 01:24:50 2010 +0400
    18.3 @@ -0,0 +1,165 @@
    18.4 +/*
    18.5 +    SDL - Simple DirectMedia Layer
    18.6 +    Copyright (C) 1997-2010 Sam Lantinga
    18.7 +
    18.8 +    This library is free software; you can redistribute it and/or
    18.9 +    modify it under the terms of the GNU Lesser General Public
   18.10 +    License as published by the Free Software Foundation; either
   18.11 +    version 2.1 of the License, or (at your option) any later version.
   18.12 +
   18.13 +    This library is distributed in the hope that it will be useful,
   18.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   18.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   18.16 +    Lesser General Public License for more details.
   18.17 +
   18.18 +    You should have received a copy of the GNU Lesser General Public
   18.19 +    License along with this library; if not, write to the Free Software
   18.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   18.21 +
   18.22 +    Sam Lantinga
   18.23 +    slouken@libsdl.org
   18.24 +*/
   18.25 +
   18.26 +#ifndef _SDL_config_macosx_h
   18.27 +#define _SDL_config_macosx_h
   18.28 +
   18.29 +#include "SDL_platform.h"
   18.30 +
   18.31 +/* This gets us MAC_OS_X_VERSION_MIN_REQUIRED... */
   18.32 +#include <AvailabilityMacros.h>
   18.33 +
   18.34 +/* This is a set of defines to configure the SDL features */
   18.35 +
   18.36 +#ifdef __LP64__
   18.37 +	#define SIZEOF_VOIDP 8
   18.38 +#else
   18.39 +	#define SIZEOF_VOIDP 4
   18.40 +#endif
   18.41 +
   18.42 +#define SDL_HAS_64BIT_TYPE	1
   18.43 +
   18.44 +/* Useful headers */
   18.45 +/* If we specified an SDK or have a post-PowerPC chip, then alloca.h exists. */
   18.46 +#if ( (MAC_OS_X_VERSION_MIN_REQUIRED >= 1030) || (!defined(__POWERPC__)) )
   18.47 +#define HAVE_ALLOCA_H		1
   18.48 +#endif
   18.49 +#define HAVE_SYS_TYPES_H	1
   18.50 +#define HAVE_STDIO_H	1
   18.51 +#define STDC_HEADERS	1
   18.52 +#define HAVE_STRING_H	1
   18.53 +#define HAVE_INTTYPES_H	1
   18.54 +#define HAVE_STDINT_H	1
   18.55 +#define HAVE_CTYPE_H	1
   18.56 +#define HAVE_MATH_H	1
   18.57 +#define HAVE_SIGNAL_H	1
   18.58 +
   18.59 +/* C library functions */
   18.60 +#define HAVE_MALLOC	1
   18.61 +#define HAVE_CALLOC	1
   18.62 +#define HAVE_REALLOC	1
   18.63 +#define HAVE_FREE	1
   18.64 +#define HAVE_ALLOCA	1
   18.65 +#define HAVE_GETENV	1
   18.66 +#define HAVE_SETENV	1
   18.67 +#define HAVE_PUTENV	1
   18.68 +#define HAVE_UNSETENV	1
   18.69 +#define HAVE_QSORT	1
   18.70 +#define HAVE_ABS	1
   18.71 +#define HAVE_BCOPY	1
   18.72 +#define HAVE_MEMSET	1
   18.73 +#define HAVE_MEMCPY	1
   18.74 +#define HAVE_MEMMOVE	1
   18.75 +#define HAVE_MEMCMP	1
   18.76 +#define HAVE_STRLEN	1
   18.77 +#define HAVE_STRLCPY	1
   18.78 +#define HAVE_STRLCAT	1
   18.79 +#define HAVE_STRDUP	1
   18.80 +#define HAVE_STRCHR	1
   18.81 +#define HAVE_STRRCHR	1
   18.82 +#define HAVE_STRSTR	1
   18.83 +#define HAVE_STRTOL	1
   18.84 +#define HAVE_STRTOUL	1
   18.85 +#define HAVE_STRTOLL	1
   18.86 +#define HAVE_STRTOULL	1
   18.87 +#define HAVE_STRTOD	1
   18.88 +#define HAVE_ATOI	1
   18.89 +#define HAVE_ATOF	1
   18.90 +#define HAVE_STRCMP	1
   18.91 +#define HAVE_STRNCMP	1
   18.92 +#define HAVE_STRCASECMP	1
   18.93 +#define HAVE_STRNCASECMP 1
   18.94 +#define HAVE_SSCANF	1
   18.95 +#define HAVE_SNPRINTF	1
   18.96 +#define HAVE_VSNPRINTF	1
   18.97 +#define HAVE_CEIL	1
   18.98 +#define HAVE_COPYSIGN	1
   18.99 +#define HAVE_COS	1
  18.100 +#define HAVE_COSF	1
  18.101 +#define HAVE_FABS	1
  18.102 +#define HAVE_FLOOR	1
  18.103 +#define HAVE_LOG	1
  18.104 +#define HAVE_POW	1
  18.105 +#define HAVE_SCALBN	1
  18.106 +#define HAVE_SIN	1
  18.107 +#define HAVE_SINF	1
  18.108 +#define HAVE_SQRT	1
  18.109 +#define HAVE_SIGACTION	1
  18.110 +#define HAVE_SETJMP	1
  18.111 +#define HAVE_NANOSLEEP	1
  18.112 +#define HAVE_SYSCONF	1
  18.113 +#define HAVE_SYSCTLBYNAME 1
  18.114 +
  18.115 +/* Enable various audio drivers */
  18.116 +#define SDL_AUDIO_DRIVER_COREAUDIO	1
  18.117 +#define SDL_AUDIO_DRIVER_DISK	1
  18.118 +#define SDL_AUDIO_DRIVER_DUMMY	1
  18.119 +
  18.120 +/* Enable various input drivers */
  18.121 +#define SDL_JOYSTICK_IOKIT	1
  18.122 +#define SDL_HAPTIC_IOKIT	1
  18.123 +
  18.124 +/* Enable various shared object loading systems */
  18.125 +#define SDL_LOADSO_DLOPEN	1
  18.126 +
  18.127 +/* Enable various threading systems */
  18.128 +#define SDL_THREAD_PTHREAD	1
  18.129 +#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX	1
  18.130 +
  18.131 +/* Enable various timer systems */
  18.132 +#define SDL_TIMER_UNIX	1
  18.133 +
  18.134 +/* Enable various video drivers */
  18.135 +#define SDL_VIDEO_DRIVER_COCOA	1
  18.136 +#define SDL_VIDEO_DRIVER_DUMMY	1
  18.137 +#define SDL_VIDEO_DRIVER_X11 1
  18.138 +#define SDL_VIDEO_DRIVER_X11_DYNAMIC "/usr/X11R6/lib/libX11.6.dylib"
  18.139 +#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/usr/X11R6/lib/libXext.6.dylib"
  18.140 +#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/usr/X11R6/lib/libXrandr.2.dylib"
  18.141 +#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER "/usr/X11R6/lib/libXrender.1.dylib"
  18.142 +#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT "/usr/X11R6/lib/libXi.6.dylib"
  18.143 +#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/usr/X11R6/lib/libXss.6.dylib"
  18.144 +#define SDL_VIDEO_DRIVER_X11_VIDMODE 1
  18.145 +#define SDL_VIDEO_DRIVER_X11_XINERAMA 1
  18.146 +#define SDL_VIDEO_DRIVER_X11_XRANDR 1
  18.147 +#define SDL_VIDEO_DRIVER_X11_XINPUT 1
  18.148 +#define SDL_VIDEO_DRIVER_X11_SCRNSAVER 1
  18.149 +#define SDL_VIDEO_DRIVER_X11_XV 1
  18.150 +
  18.151 +#define SDL_VIDEO_RENDER_OGL	1
  18.152 +#define SDL_VIDEO_RENDER_X11	1
  18.153 +
  18.154 +/* Enable OpenGL support */
  18.155 +#define SDL_VIDEO_OPENGL	1
  18.156 +#define SDL_VIDEO_OPENGL_CGL	1
  18.157 +#define SDL_VIDEO_OPENGL_GLX	1
  18.158 +
  18.159 +/* Enable system power support */
  18.160 +#define SDL_POWER_MACOSX 1
  18.161 +
  18.162 +/* Enable assembly routines */
  18.163 +#define SDL_ASSEMBLY_ROUTINES	1
  18.164 +#ifdef __ppc__
  18.165 +#define SDL_ALTIVEC_BLITTERS	1
  18.166 +#endif
  18.167 +
  18.168 +#endif /* _SDL_config_macosx_h */
    19.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.2 +++ b/touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_config_minimal.h	Sat Jul 31 01:24:50 2010 +0400
    19.3 @@ -0,0 +1,68 @@
    19.4 +/*
    19.5 +    SDL - Simple DirectMedia Layer
    19.6 +    Copyright (C) 1997-2010 Sam Lantinga
    19.7 +
    19.8 +    This library is free software; you can redistribute it and/or
    19.9 +    modify it under the terms of the GNU Lesser General Public
   19.10 +    License as published by the Free Software Foundation; either
   19.11 +    version 2.1 of the License, or (at your option) any later version.
   19.12 +
   19.13 +    This library is distributed in the hope that it will be useful,
   19.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   19.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   19.16 +    Lesser General Public License for more details.
   19.17 +
   19.18 +    You should have received a copy of the GNU Lesser General Public
   19.19 +    License along with this library; if not, write to the Free Software
   19.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   19.21 +
   19.22 +    Sam Lantinga
   19.23 +    slouken@libsdl.org
   19.24 +*/
   19.25 +
   19.26 +#ifndef _SDL_config_minimal_h
   19.27 +#define _SDL_config_minimal_h
   19.28 +
   19.29 +#include "SDL_platform.h"
   19.30 +
   19.31 +/**
   19.32 + *  \file SDL_config_minimal.h
   19.33 + *  
   19.34 + *  This is the minimal configuration that can be used to build SDL.
   19.35 + */
   19.36 +
   19.37 +#include <stdarg.h>
   19.38 +
   19.39 +#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
   19.40 +typedef signed char int8_t;
   19.41 +typedef unsigned char uint8_t;
   19.42 +typedef signed short int16_t;
   19.43 +typedef unsigned short uint16_t;
   19.44 +typedef signed int int32_t;
   19.45 +typedef unsigned int uint32_t;
   19.46 +typedef unsigned int size_t;
   19.47 +typedef unsigned long uintptr_t;
   19.48 +#endif /* !_STDINT_H_ && !HAVE_STDINT_H */
   19.49 +
   19.50 +/* Enable the dummy audio driver (src/audio/dummy/\*.c) */
   19.51 +#define SDL_AUDIO_DRIVER_DUMMY	1
   19.52 +
   19.53 +/* Enable the stub joystick driver (src/joystick/dummy/\*.c) */
   19.54 +#define SDL_JOYSTICK_DISABLED	1
   19.55 +
   19.56 +/* Enable the stub haptic driver (src/haptic/dummy/\*.c) */
   19.57 +#define SDL_HAPTIC_DISABLED	1
   19.58 +
   19.59 +/* Enable the stub shared object loader (src/loadso/dummy/\*.c) */
   19.60 +#define SDL_LOADSO_DISABLED	1
   19.61 +
   19.62 +/* Enable the stub thread support (src/thread/generic/\*.c) */
   19.63 +#define SDL_THREADS_DISABLED	1
   19.64 +
   19.65 +/* Enable the stub timer support (src/timer/dummy/\*.c) */
   19.66 +#define SDL_TIMERS_DISABLED	1
   19.67 +
   19.68 +/* Enable the dummy video driver (src/video/dummy/\*.c) */
   19.69 +#define SDL_VIDEO_DRIVER_DUMMY	1
   19.70 +
   19.71 +#endif /* _SDL_config_minimal_h */
    20.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.2 +++ b/touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_config_nintendods.h	Sat Jul 31 01:24:50 2010 +0400
    20.3 @@ -0,0 +1,121 @@
    20.4 +/*
    20.5 +    SDL - Simple DirectMedia Layer
    20.6 +    Copyright (C) 1997-2010 Sam Lantinga
    20.7 +
    20.8 +    This library is free software; you can redistribute it and/or
    20.9 +    modify it under the terms of the GNU Lesser General Public
   20.10 +    License as published by the Free Software Foundation; either
   20.11 +    version 2.1 of the License, or (at your option) any later version.
   20.12 +
   20.13 +    This library is distributed in the hope that it will be useful,
   20.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   20.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   20.16 +    Lesser General Public License for more details.
   20.17 +
   20.18 +    You should have received a copy of the GNU Lesser General Public
   20.19 +    License along with this library; if not, write to the Free Software
   20.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   20.21 +
   20.22 +    Sam Lantinga
   20.23 +    slouken@libsdl.org
   20.24 +*/
   20.25 +
   20.26 +#ifndef _SDL_config_nintendods_h
   20.27 +#define _SDL_config_nintendods_h
   20.28 +
   20.29 +#include "SDL_platform.h"
   20.30 +
   20.31 +/* This is a set of defines to configure the SDL features */
   20.32 +
   20.33 +#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
   20.34 +typedef signed char int8_t;
   20.35 +typedef unsigned char uint8_t;
   20.36 +typedef signed short int16_t;
   20.37 +typedef unsigned short uint16_t;
   20.38 +typedef signed int int32_t;
   20.39 +typedef unsigned int uint32_t;
   20.40 +typedef signed long long int64_t;
   20.41 +typedef unsigned long long uint64_t;
   20.42 +
   20.43 +/* LiF: __PTRDIFF_TYPE__ was causing errors of conflicting typedefs with the
   20.44 +   <stdint.h> shipping with devkitARM.  copied a similar ifdef from it. */
   20.45 +#ifndef __PTRDIFF_TYPE__
   20.46 +typedef unsigned long uintptr_t;
   20.47 +#else
   20.48 +typedef unsigned __PTRDIFF_TYPE__ uintptr_t;
   20.49 +#endif
   20.50 +#endif /* !_STDINT_H_ && !HAVE_STDINT_H */
   20.51 +
   20.52 +#define SDL_HAS_64BIT_TYPE	1
   20.53 +
   20.54 +/* Useful headers */
   20.55 +#define HAVE_SYS_TYPES_H	1
   20.56 +#define HAVE_STDIO_H	1
   20.57 +#define STDC_HEADERS	1
   20.58 +#define HAVE_STRING_H	1
   20.59 +#define HAVE_CTYPE_H	1
   20.60 +
   20.61 +/* C library functions */
   20.62 +#define HAVE_MALLOC	1
   20.63 +#define HAVE_CALLOC	1
   20.64 +#define HAVE_REALLOC	1
   20.65 +#define HAVE_FREE	1
   20.66 +#define HAVE_ALLOCA	1
   20.67 +#define HAVE_GETENV	1
   20.68 +#define HAVE_SETENV	1
   20.69 +#define HAVE_PUTENV	1
   20.70 +#define HAVE_QSORT	1
   20.71 +#define HAVE_ABS	1
   20.72 +#define HAVE_BCOPY	1
   20.73 +#define HAVE_MEMSET	1
   20.74 +#define HAVE_MEMCPY	1
   20.75 +#define HAVE_MEMMOVE	1
   20.76 +#define HAVE_MEMCMP	1
   20.77 +#define HAVE_STRLEN	1
   20.78 +#define HAVE_STRDUP	1
   20.79 +#define HAVE_INDEX	1
   20.80 +#define HAVE_RINDEX	1
   20.81 +#define HAVE_STRCHR	1
   20.82 +#define HAVE_STRRCHR	1
   20.83 +#define HAVE_STRSTR	1
   20.84 +#define HAVE_STRTOL	1
   20.85 +#define HAVE_STRTOD	1
   20.86 +#define HAVE_ATOI	1
   20.87 +#define HAVE_ATOF	1
   20.88 +#define HAVE_STRCMP	1
   20.89 +#define HAVE_STRNCMP	1
   20.90 +#define HAVE_STRICMP	1
   20.91 +#define HAVE_STRCASECMP	1
   20.92 +#define HAVE_SSCANF	1
   20.93 +#define HAVE_SNPRINTF	1
   20.94 +#define HAVE_VSNPRINTF	1
   20.95 +
   20.96 +/* DS isn't that sophisticated */
   20.97 +#define LACKS_SYS_MMAN_H 1
   20.98 +
   20.99 +/* Enable various audio drivers */
  20.100 +#define SDL_AUDIO_DRIVER_NDS	1
  20.101 +/*#define SDL_AUDIO_DRIVER_DUMMY	1 TODO: uncomment this later*/
  20.102 +
  20.103 +/* Enable various input drivers */
  20.104 +#define SDL_JOYSTICK_NDS	1
  20.105 +/*#define SDL_JOYSTICK_DUMMY	1 TODO: uncomment this later*/
  20.106 +
  20.107 +/* DS has no dynamic linking afaik */
  20.108 +#define SDL_LOADSO_DISABLED	1
  20.109 +
  20.110 +/* Enable various threading systems */
  20.111 +/*#define SDL_THREAD_NDS	1*/
  20.112 +#define SDL_THREADS_DISABLED	1
  20.113 +
  20.114 +/* Enable various timer systems */
  20.115 +#define SDL_TIMER_NDS	1
  20.116 +
  20.117 +/* Enable various video drivers */
  20.118 +#define SDL_VIDEO_DRIVER_NDS	1
  20.119 +/*#define SDL_VIDEO_DRIVER_DUMMY	1 TODO: uncomment this later*/
  20.120 +
  20.121 +/* Enable system power support */
  20.122 +#define SDL_POWER_NINTENDODS 1
  20.123 +
  20.124 +#endif /* _SDL_config_nintendods_h */
    21.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.2 +++ b/touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_config_pandora.h	Sat Jul 31 01:24:50 2010 +0400
    21.3 @@ -0,0 +1,127 @@
    21.4 +/*
    21.5 +    SDL - Simple DirectMedia Layer
    21.6 +    Copyright (C) 1997-2010 Sam Lantinga
    21.7 +
    21.8 +    This library is free software; you can redistribute it and/or
    21.9 +    modify it under the terms of the GNU Lesser General Public
   21.10 +    License as published by the Free Software Foundation; either
   21.11 +    version 2.1 of the License, or (at your option) any later version.
   21.12 +
   21.13 +    This library is distributed in the hope that it will be useful,
   21.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   21.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   21.16 +    Lesser General Public License for more details.
   21.17 +
   21.18 +    You should have received a copy of the GNU Lesser General Public
   21.19 +    License along with this library; if not, write to the Free Software
   21.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   21.21 +
   21.22 +    Sam Lantinga
   21.23 +    slouken@libsdl.org
   21.24 +*/
   21.25 +
   21.26 +#ifndef _SDL_config_h
   21.27 +#define _SDL_config_h
   21.28 +
   21.29 +/* This is a set of defines to configure the SDL features */
   21.30 +
   21.31 +/* General platform specific identifiers */
   21.32 +#include "SDL_platform.h"
   21.33 +
   21.34 +#ifdef __LP64__
   21.35 +#define SIZEOF_VOIDP 8
   21.36 +#else
   21.37 +#define SIZEOF_VOIDP 4
   21.38 +#endif
   21.39 +
   21.40 +#define SDL_HAS_64BIT_TYPE 1
   21.41 +#define SDL_BYTEORDER 1234
   21.42 +
   21.43 +#define HAVE_ALLOCA_H 1
   21.44 +#define HAVE_SYS_TYPES_H 1
   21.45 +#define HAVE_STDIO_H 1
   21.46 +#define STDC_HEADERS 1
   21.47 +#define HAVE_STDLIB_H 1
   21.48 +#define HAVE_STDARG_H 1
   21.49 +#define HAVE_MALLOC_H 1
   21.50 +#define HAVE_MEMORY_H 1
   21.51 +#define HAVE_STRING_H 1
   21.52 +#define HAVE_STRINGS_H 1
   21.53 +#define HAVE_INTTYPES_H 1
   21.54 +#define HAVE_STDINT_H 1
   21.55 +#define HAVE_CTYPE_H 1
   21.56 +#define HAVE_MATH_H 1
   21.57 +#define HAVE_ICONV_H 1
   21.58 +#define HAVE_SIGNAL_H 1
   21.59 +#define HAVE_MALLOC 1
   21.60 +#define HAVE_CALLOC 1
   21.61 +#define HAVE_REALLOC 1
   21.62 +#define HAVE_FREE 1
   21.63 +#define HAVE_ALLOCA 1
   21.64 +#define HAVE_GETENV 1
   21.65 +#define HAVE_SETENV	1
   21.66 +#define HAVE_PUTENV 1
   21.67 +#define HAVE_UNSETENV 1
   21.68 +#define HAVE_QSORT 1
   21.69 +#define HAVE_ABS 1
   21.70 +#define HAVE_BCOPY 1
   21.71 +#define HAVE_MEMSET 1
   21.72 +#define HAVE_MEMCPY 1
   21.73 +#define HAVE_MEMMOVE 1
   21.74 +#define HAVE_STRLEN 1
   21.75 +#define HAVE_STRDUP 1
   21.76 +#define HAVE_STRCHR 1
   21.77 +#define HAVE_STRRCHR 1
   21.78 +#define HAVE_STRSTR 1
   21.79 +#define HAVE_STRTOL 1
   21.80 +#define HAVE_STRTOUL 1
   21.81 +#define HAVE_STRTOLL 1
   21.82 +#define HAVE_STRTOULL 1
   21.83 +#define HAVE_ATOI 1
   21.84 +#define HAVE_ATOF 1
   21.85 +#define HAVE_STRCMP 1
   21.86 +#define HAVE_STRNCMP 1
   21.87 +#define HAVE_STRCASECMP 1
   21.88 +#define HAVE_STRNCASECMP 1
   21.89 +#define HAVE_SSCANF 1
   21.90 +#define HAVE_SNPRINTF 1
   21.91 +#define HAVE_VSNPRINTF 1
   21.92 +#define HAVE_M_PI 1
   21.93 +#define HAVE_CEIL 1
   21.94 +#define HAVE_COPYSIGN 1
   21.95 +#define HAVE_COS 1
   21.96 +#define HAVE_COSF 1
   21.97 +#define HAVE_FABS 1
   21.98 +#define HAVE_FLOOR 1
   21.99 +#define HAVE_LOG 1
  21.100 +#define HAVE_SCALBN 1
  21.101 +#define HAVE_SIN 1
  21.102 +#define HAVE_SINF 1
  21.103 +#define HAVE_SQRT 1
  21.104 +#define HAVE_SIGACTION 1
  21.105 +#define HAVE_SETJMP 1
  21.106 +#define HAVE_NANOSLEEP 1
  21.107 +
  21.108 +#define SDL_AUDIO_DRIVER_DUMMY 1
  21.109 +#define SDL_AUDIO_DRIVER_OSS 1
  21.110 +
  21.111 +#define SDL_INPUT_LINUXEV 1
  21.112 +#define SDL_INPUT_TSLIB 1
  21.113 +#define SDL_JOYSTICK_LINUX 1
  21.114 +#define SDL_HAPTIC_LINUX 1
  21.115 +
  21.116 +#define SDL_LOADSO_DLOPEN 1
  21.117 +
  21.118 +#define SDL_THREAD_PTHREAD 1
  21.119 +#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP 1
  21.120 +
  21.121 +#define SDL_TIMER_UNIX 1
  21.122 +
  21.123 +#define SDL_VIDEO_DRIVER_DUMMY 1
  21.124 +#define SDL_VIDEO_DRIVER_X11 1
  21.125 +#define SDL_VIDEO_DRIVER_X11_XINPUT 1
  21.126 +#define SDL_VIDEO_DRIVER_PANDORA 1
  21.127 +#define SDL_VIDEO_RENDER_OGL_ES 1
  21.128 +#define SDL_VIDEO_OPENGL_ES 1
  21.129 +
  21.130 +#endif /* _SDL_config_h */
    22.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.2 +++ b/touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_config_win32.h	Sat Jul 31 01:24:50 2010 +0400
    22.3 @@ -0,0 +1,197 @@
    22.4 +/*
    22.5 +    SDL - Simple DirectMedia Layer
    22.6 +    Copyright (C) 1997-2010 Sam Lantinga
    22.7 +
    22.8 +    This library is free software; you can redistribute it and/or
    22.9 +    modify it under the terms of the GNU Lesser General Public
   22.10 +    License as published by the Free Software Foundation; either
   22.11 +    version 2.1 of the License, or (at your option) any later version.
   22.12 +
   22.13 +    This library is distributed in the hope that it will be useful,
   22.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   22.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   22.16 +    Lesser General Public License for more details.
   22.17 +
   22.18 +    You should have received a copy of the GNU Lesser General Public
   22.19 +    License along with this library; if not, write to the Free Software
   22.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   22.21 +
   22.22 +    Sam Lantinga
   22.23 +    slouken@libsdl.org
   22.24 +*/
   22.25 +
   22.26 +#ifndef _SDL_config_win32_h
   22.27 +#define _SDL_config_win32_h
   22.28 +
   22.29 +#include "SDL_platform.h"
   22.30 +
   22.31 +/* This is a set of defines to configure the SDL features */
   22.32 +
   22.33 +#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
   22.34 +#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__)
   22.35 +#define HAVE_STDINT_H	1
   22.36 +#elif defined(_MSC_VER)
   22.37 +typedef signed __int8 int8_t;
   22.38 +typedef unsigned __int8 uint8_t;
   22.39 +typedef signed __int16 int16_t;
   22.40 +typedef unsigned __int16 uint16_t;
   22.41 +typedef signed __int32 int32_t;
   22.42 +typedef unsigned __int32 uint32_t;
   22.43 +typedef signed __int64 int64_t;
   22.44 +typedef unsigned __int64 uint64_t;
   22.45 +#ifndef _UINTPTR_T_DEFINED
   22.46 +#ifdef  _WIN64
   22.47 +typedef unsigned __int64 uintptr_t;
   22.48 +#else
   22.49 +typedef unsigned int uintptr_t;
   22.50 +#endif
   22.51 +#define _UINTPTR_T_DEFINED
   22.52 +#endif
   22.53 +/* Older Visual C++ headers don't have the Win64-compatible typedefs... */
   22.54 +#if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR)))
   22.55 +#define DWORD_PTR DWORD
   22.56 +#endif
   22.57 +#if ((_MSC_VER <= 1200) && (!defined(LONG_PTR)))
   22.58 +#define LONG_PTR LONG
   22.59 +#endif
   22.60 +#else /* !__GNUC__ && !_MSC_VER */
   22.61 +typedef signed char int8_t;
   22.62 +typedef unsigned char uint8_t;
   22.63 +typedef signed short int16_t;
   22.64 +typedef unsigned short uint16_t;
   22.65 +typedef signed int int32_t;
   22.66 +typedef unsigned int uint32_t;
   22.67 +typedef signed long long int64_t;
   22.68 +typedef unsigned long long uint64_t;
   22.69 +#ifndef _SIZE_T_DEFINED_
   22.70 +#define _SIZE_T_DEFINED_
   22.71 +typedef unsigned int size_t;
   22.72 +#endif
   22.73 +typedef unsigned int uintptr_t;
   22.74 +#endif /* __GNUC__ || _MSC_VER */
   22.75 +#endif /* !_STDINT_H_ && !HAVE_STDINT_H */
   22.76 +
   22.77 +#ifdef _WIN64
   22.78 +# define SIZEOF_VOIDP 8
   22.79 +#else
   22.80 +# define SIZEOF_VOIDP 4
   22.81 +#endif
   22.82 +#define SDL_HAS_64BIT_TYPE	1
   22.83 +
   22.84 +/* Enabled for SDL 1.2 (binary compatibility) */
   22.85 +//#define HAVE_LIBC     1
   22.86 +#ifdef HAVE_LIBC
   22.87 +/* Useful headers */
   22.88 +#define HAVE_STDIO_H 1
   22.89 +#define STDC_HEADERS 1
   22.90 +#define HAVE_STRING_H 1
   22.91 +#define HAVE_CTYPE_H 1
   22.92 +#define HAVE_MATH_H 1
   22.93 +#ifndef _WIN32_WCE
   22.94 +#define HAVE_SIGNAL_H 1
   22.95 +#endif
   22.96 +
   22.97 +/* C library functions */
   22.98 +#define HAVE_MALLOC 1
   22.99 +#define HAVE_CALLOC 1
  22.100 +#define HAVE_REALLOC 1
  22.101 +#define HAVE_FREE 1
  22.102 +#define HAVE_ALLOCA 1
  22.103 +#define HAVE_QSORT 1
  22.104 +#define HAVE_ABS 1
  22.105 +#define HAVE_MEMSET 1
  22.106 +#define HAVE_MEMCPY 1
  22.107 +#define HAVE_MEMMOVE 1
  22.108 +#define HAVE_MEMCMP 1
  22.109 +#define HAVE_STRLEN 1
  22.110 +#define HAVE__STRREV 1
  22.111 +#define HAVE__STRUPR 1
  22.112 +#define HAVE__STRLWR 1
  22.113 +#define HAVE_STRCHR 1
  22.114 +#define HAVE_STRRCHR 1
  22.115 +#define HAVE_STRSTR 1
  22.116 +#define HAVE_ITOA 1
  22.117 +#define HAVE__LTOA 1
  22.118 +#define HAVE__ULTOA 1
  22.119 +#define HAVE_STRTOL 1
  22.120 +#define HAVE_STRTOUL 1
  22.121 +#define HAVE_STRTOLL 1
  22.122 +#define HAVE_STRTOD 1
  22.123 +#define HAVE_ATOI 1
  22.124 +#define HAVE_ATOF 1
  22.125 +#define HAVE_STRCMP 1
  22.126 +#define HAVE_STRNCMP 1
  22.127 +#define HAVE__STRICMP 1
  22.128 +#define HAVE__STRNICMP 1
  22.129 +#define HAVE_SSCANF 1
  22.130 +#define HAVE_M_PI 1
  22.131 +#define HAVE_CEIL 1
  22.132 +#define HAVE_COPYSIGN 1
  22.133 +#define HAVE_COS 1
  22.134 +#define HAVE_COSF 1
  22.135 +#define HAVE_FABS 1
  22.136 +#define HAVE_FLOOR 1
  22.137 +#define HAVE_LOG 1
  22.138 +#define HAVE_POW 1
  22.139 +#define HAVE_SCALBN 1
  22.140 +#define HAVE_SIN 1
  22.141 +#define HAVE_SINF 1
  22.142 +#define HAVE_SQRT 1
  22.143 +#else
  22.144 +#define HAVE_STDARG_H	1
  22.145 +#define HAVE_STDDEF_H	1
  22.146 +#endif
  22.147 +
  22.148 +/* Enable various audio drivers */
  22.149 +#ifndef _WIN32_WCE
  22.150 +#define SDL_AUDIO_DRIVER_DSOUND	1
  22.151 +#endif
  22.152 +#define SDL_AUDIO_DRIVER_WINWAVEOUT	1
  22.153 +#define SDL_AUDIO_DRIVER_DISK	1
  22.154 +#define SDL_AUDIO_DRIVER_DUMMY	1
  22.155 +
  22.156 +/* Enable various input drivers */
  22.157 +#ifdef _WIN32_WCE
  22.158 +#define SDL_JOYSTICK_DISABLED	1
  22.159 +#define SDL_HAPTIC_DUMMY	1
  22.160 +#else
  22.161 +#define SDL_JOYSTICK_DINPUT	1
  22.162 +#define SDL_HAPTIC_DINPUT	1
  22.163 +#endif
  22.164 +
  22.165 +/* Enable various shared object loading systems */
  22.166 +#define SDL_LOADSO_WIN32	1
  22.167 +
  22.168 +/* Enable various threading systems */
  22.169 +#define SDL_THREAD_WIN32	1
  22.170 +
  22.171 +/* Enable various timer systems */
  22.172 +#ifdef _WIN32_WCE
  22.173 +#define SDL_TIMER_WINCE	1
  22.174 +#else
  22.175 +#define SDL_TIMER_WIN32	1
  22.176 +#endif
  22.177 +
  22.178 +/* Enable various video drivers */
  22.179 +#define SDL_VIDEO_DRIVER_DUMMY	1
  22.180 +#define SDL_VIDEO_DRIVER_WIN32	1
  22.181 +
  22.182 +#define SDL_VIDEO_RENDER_D3D	1
  22.183 +#define SDL_VIDEO_RENDER_GDI	1
  22.184 +
  22.185 +/* Enable OpenGL support */
  22.186 +#ifndef _WIN32_WCE
  22.187 +#define SDL_VIDEO_OPENGL	1
  22.188 +#define SDL_VIDEO_OPENGL_WGL	1
  22.189 +#define SDL_VIDEO_RENDER_OGL	1
  22.190 +#endif
  22.191 +
  22.192 +/* Enable system power support */
  22.193 +#define SDL_POWER_WINDOWS 1
  22.194 +
  22.195 +/* Enable assembly routines (Win64 doesn't have inline asm) */
  22.196 +#ifndef _WIN64
  22.197 +#define SDL_ASSEMBLY_ROUTINES	1
  22.198 +#endif
  22.199 +
  22.200 +#endif /* _SDL_config_win32_h */
    23.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.2 +++ b/touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_config_wiz.h	Sat Jul 31 01:24:50 2010 +0400
    23.3 @@ -0,0 +1,126 @@
    23.4 +/*
    23.5 +    SDL - Simple DirectMedia Layer
    23.6 +    Copyright (C) 1997-2010 Sam Lantinga
    23.7 +
    23.8 +    This library is free software; you can redistribute it and/or
    23.9 +    modify it under the terms of the GNU Lesser General Public
   23.10 +    License as published by the Free Software Foundation; either
   23.11 +    version 2.1 of the License, or (at your option) any later version.
   23.12 +
   23.13 +    This library is distributed in the hope that it will be useful,
   23.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   23.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   23.16 +    Lesser General Public License for more details.
   23.17 +
   23.18 +    You should have received a copy of the GNU Lesser General Public
   23.19 +    License along with this library; if not, write to the Free Software
   23.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   23.21 +
   23.22 +    Sam Lantinga
   23.23 +    slouken@libsdl.org
   23.24 +*/
   23.25 +
   23.26 +#ifndef _SDL_config_h
   23.27 +#define _SDL_config_h
   23.28 +
   23.29 +/* This is a set of defines to configure the SDL features */
   23.30 +
   23.31 +/* General platform specific identifiers */
   23.32 +#include "SDL_platform.h"
   23.33 +
   23.34 +/* Make sure that this isn't included by Visual C++ */
   23.35 +#ifdef _MSC_VER
   23.36 +#error You should copy include/SDL_config.h.default to include/SDL_config.h
   23.37 +#endif
   23.38 +
   23.39 +#define SDL_HAS_64BIT_TYPE 1
   23.40 +#define SDL_BYTEORDER 1234
   23.41 +
   23.42 +#define HAVE_ALLOCA_H 1
   23.43 +#define HAVE_SYS_TYPES_H 1
   23.44 +#define HAVE_STDIO_H 1
   23.45 +#define STDC_HEADERS 1
   23.46 +#define HAVE_STDLIB_H 1
   23.47 +#define HAVE_STDARG_H 1
   23.48 +#define HAVE_MALLOC_H 1
   23.49 +#define HAVE_MEMORY_H 1
   23.50 +#define HAVE_STRING_H 1
   23.51 +#define HAVE_STRINGS_H 1
   23.52 +#define HAVE_INTTYPES_H 1
   23.53 +#define HAVE_STDINT_H 1
   23.54 +#define HAVE_CTYPE_H 1
   23.55 +#define HAVE_MATH_H 1
   23.56 +#define HAVE_ICONV_H 1
   23.57 +#define HAVE_SIGNAL_H 1
   23.58 +#define HAVE_MALLOC 1
   23.59 +#define HAVE_CALLOC 1
   23.60 +#define HAVE_REALLOC 1
   23.61 +#define HAVE_FREE 1
   23.62 +#define HAVE_ALLOCA 1
   23.63 +#define HAVE_GETENV 1
   23.64 +#define HAVE_SETENV	1
   23.65 +#define HAVE_PUTENV 1
   23.66 +#define HAVE_UNSETENV 1
   23.67 +#define HAVE_QSORT 1
   23.68 +#define HAVE_ABS 1
   23.69 +#define HAVE_BCOPY 1
   23.70 +#define HAVE_MEMSET 1
   23.71 +#define HAVE_MEMCPY 1
   23.72 +#define HAVE_MEMMOVE 1
   23.73 +#define HAVE_STRLEN 1
   23.74 +#define HAVE_STRDUP 1
   23.75 +#define HAVE_STRCHR 1
   23.76 +#define HAVE_STRRCHR 1
   23.77 +#define HAVE_STRSTR 1
   23.78 +#define HAVE_STRTOL 1
   23.79 +#define HAVE_STRTOUL 1
   23.80 +#define HAVE_STRTOLL 1
   23.81 +#define HAVE_STRTOULL 1
   23.82 +#define HAVE_ATOI 1
   23.83 +#define HAVE_ATOF 1
   23.84 +#define HAVE_STRCMP 1
   23.85 +#define HAVE_STRNCMP 1
   23.86 +#define HAVE_STRCASECMP 1
   23.87 +#define HAVE_STRNCASECMP 1
   23.88 +#define HAVE_SSCANF 1
   23.89 +#define HAVE_SNPRINTF 1
   23.90 +#define HAVE_VSNPRINTF 1
   23.91 +#define HAVE_M_PI 1
   23.92 +#define HAVE_CEIL 1
   23.93 +#define HAVE_COPYSIGN 1
   23.94 +#define HAVE_COS 1
   23.95 +#define HAVE_COSF 1
   23.96 +#define HAVE_FABS 1
   23.97 +#define HAVE_FLOOR 1
   23.98 +#define HAVE_LOG 1
   23.99 +#define HAVE_SCALBN 1
  23.100 +#define HAVE_SIN 1
  23.101 +#define HAVE_SINF 1
  23.102 +#define HAVE_SQRT 1
  23.103 +#define HAVE_SIGACTION 1
  23.104 +#define HAVE_SETJMP 1
  23.105 +#define HAVE_NANOSLEEP 1
  23.106 +#define HAVE_POW 1
  23.107 +
  23.108 +#define SDL_CDROM_DISABLED 1
  23.109 +#define SDL_AUDIO_DRIVER_DUMMY 1
  23.110 +#define SDL_AUDIO_DRIVER_OSS 1
  23.111 +
  23.112 +#define SDL_INPUT_LINUXEV 1
  23.113 +#define SDL_INPUT_TSLIB 1
  23.114 +#define SDL_JOYSTICK_LINUX 1
  23.115 +#define SDL_HAPTIC_LINUX 1
  23.116 +
  23.117 +#define SDL_LOADSO_DLOPEN 1
  23.118 +
  23.119 +#define SDL_THREAD_PTHREAD 1
  23.120 +#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP 1
  23.121 +
  23.122 +#define SDL_TIMER_UNIX 1
  23.123 +
  23.124 +#define SDL_VIDEO_DRIVER_DUMMY 1
  23.125 +#define SDL_VIDEO_DRIVER_PANDORA 1
  23.126 +#define SDL_VIDEO_RENDER_OGL_ES 1
  23.127 +#define SDL_VIDEO_OPENGL_ES 1
  23.128 +
  23.129 +#endif /* _SDL_config_h */
    24.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.2 +++ b/touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_copying.h	Sat Jul 31 01:24:50 2010 +0400
    24.3 @@ -0,0 +1,21 @@
    24.4 +/*
    24.5 +    SDL - Simple DirectMedia Layer
    24.6 +    Copyright (C) 1997-2010 Sam Lantinga
    24.7 +
    24.8 +    This library is free software; you can redistribute it and/or
    24.9 +    modify it under the terms of the GNU Lesser General Public
   24.10 +    License as published by the Free Software Foundation; either
   24.11 +    version 2.1 of the License, or (at your option) any later version.
   24.12 +
   24.13 +    This library is distributed in the hope that it will be useful,
   24.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   24.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   24.16 +    Lesser General Public License for more details.
   24.17 +
   24.18 +    You should have received a copy of the GNU Lesser General Public
   24.19 +    License along with this library; if not, write to the Free Software
   24.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   24.21 +
   24.22 +    Sam Lantinga
   24.23 +    slouken@libsdl.org
   24.24 +*/
    25.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    25.2 +++ b/touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_cpuinfo.h	Sat Jul 31 01:24:50 2010 +0400
    25.3 @@ -0,0 +1,97 @@
    25.4 +/*
    25.5 +    SDL - Simple DirectMedia Layer
    25.6 +    Copyright (C) 1997-2010 Sam Lantinga
    25.7 +
    25.8 +    This library is free software; you can redistribute it and/or
    25.9 +    modify it under the terms of the GNU Lesser General Public
   25.10 +    License as published by the Free Software Foundation; either
   25.11 +    version 2.1 of the License, or (at your option) any later version.
   25.12 +
   25.13 +    This library is distributed in the hope that it will be useful,
   25.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   25.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   25.16 +    Lesser General Public License for more details.
   25.17 +
   25.18 +    You should have received a copy of the GNU Lesser General Public
   25.19 +    License along with this library; if not, write to the Free Software
   25.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   25.21 +
   25.22 +    Sam Lantinga
   25.23 +    slouken@libsdl.org
   25.24 +*/
   25.25 +
   25.26 +/**
   25.27 + *  \file SDL_cpuinfo.h
   25.28 + *  
   25.29 + *  CPU feature detection for SDL.
   25.30 + */
   25.31 +
   25.32 +#ifndef _SDL_cpuinfo_h
   25.33 +#define _SDL_cpuinfo_h
   25.34 +
   25.35 +#include "SDL_stdinc.h"
   25.36 +
   25.37 +#include "begin_code.h"
   25.38 +/* Set up for C function definitions, even when using C++ */
   25.39 +#ifdef __cplusplus
   25.40 +/* *INDENT-OFF* */
   25.41 +extern "C" {
   25.42 +/* *INDENT-ON* */
   25.43 +#endif
   25.44 +
   25.45 +/**
   25.46 + *  This function returns the number of CPU cores available.
   25.47 + */
   25.48 +extern DECLSPEC int SDLCALL SDL_GetCPUCount(void);
   25.49 +
   25.50 +/**
   25.51 + *  This function returns true if the CPU has the RDTSC instruction.
   25.52 + */
   25.53 +extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void);
   25.54 +
   25.55 +/**
   25.56 + *  This function returns true if the CPU has MMX features.
   25.57 + */
   25.58 +extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void);
   25.59 +
   25.60 +/**
   25.61 + *  This function returns true if the CPU has MMX Ext.\ features.
   25.62 + */
   25.63 +extern DECLSPEC SDL_bool SDLCALL SDL_HasMMXExt(void);
   25.64 +
   25.65 +/**
   25.66 + *  This function returns true if the CPU has 3DNow!\ features.
   25.67 + */
   25.68 +extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void);
   25.69 +
   25.70 +/**
   25.71 + *  This function returns true if the CPU has 3DNow!\ Ext.\ features.
   25.72 + */
   25.73 +extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNowExt(void);
   25.74 +
   25.75 +/**
   25.76 + *  This function returns true if the CPU has SSE features.
   25.77 + */
   25.78 +extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void);
   25.79 +
   25.80 +/**
   25.81 + *  This function returns true if the CPU has SSE2 features.
   25.82 + */
   25.83 +extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void);
   25.84 +
   25.85 +/**
   25.86 + *  This function returns true if the CPU has AltiVec features.
   25.87 + */
   25.88 +extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void);
   25.89 +
   25.90 +/* Ends C function definitions when using C++ */
   25.91 +#ifdef __cplusplus
   25.92 +/* *INDENT-OFF* */
   25.93 +}
   25.94 +/* *INDENT-ON* */
   25.95 +#endif
   25.96 +#include "close_code.h"
   25.97 +
   25.98 +#endif /* _SDL_cpuinfo_h */
   25.99 +
  25.100 +/* vi: set ts=4 sw=4 expandtab: */
    26.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    26.2 +++ b/touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_endian.h	Sat Jul 31 01:24:50 2010 +0400
    26.3 @@ -0,0 +1,253 @@
    26.4 +/*
    26.5 +    SDL - Simple DirectMedia Layer
    26.6 +    Copyright (C) 1997-2010 Sam Lantinga
    26.7 +
    26.8 +    This library is free software; you can redistribute it and/or
    26.9 +    modify it under the terms of the GNU Lesser General Public
   26.10 +    License as published by the Free Software Foundation; either
   26.11 +    version 2.1 of the License, or (at your option) any later version.
   26.12 +
   26.13 +    This library is distributed in the hope that it will be useful,
   26.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   26.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   26.16 +    Lesser General Public License for more details.
   26.17 +
   26.18 +    You should have received a copy of the GNU Lesser General Public
   26.19 +    License along with this library; if not, write to the Free Software
   26.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   26.21 +
   26.22 +    Sam Lantinga
   26.23 +    slouken@libsdl.org
   26.24 +*/
   26.25 +
   26.26 +/**
   26.27 + *  \file SDL_endian.h
   26.28 + *  
   26.29 + *  Functions for reading and writing endian-specific values
   26.30 + */
   26.31 +
   26.32 +#ifndef _SDL_endian_h
   26.33 +#define _SDL_endian_h
   26.34 +
   26.35 +#include "SDL_stdinc.h"
   26.36 +
   26.37 +/**
   26.38 + *  \name The two types of endianness
   26.39 + */
   26.40 +/*@{*/
   26.41 +#define SDL_LIL_ENDIAN	1234
   26.42 +#define SDL_BIG_ENDIAN	4321
   26.43 +/*@}*/
   26.44 +
   26.45 +#ifndef SDL_BYTEORDER           /* Not defined in SDL_config.h? */
   26.46 +#if defined(__hppa__) || \
   26.47 +    defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \
   26.48 +    (defined(__MIPS__) && defined(__MISPEB__)) || \
   26.49 +    defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || \
   26.50 +    defined(__sparc__)
   26.51 +#define SDL_BYTEORDER	SDL_BIG_ENDIAN
   26.52 +#else
   26.53 +#define SDL_BYTEORDER	SDL_LIL_ENDIAN
   26.54 +#endif
   26.55 +#endif /* !SDL_BYTEORDER */
   26.56 +
   26.57 +
   26.58 +#include "begin_code.h"
   26.59 +/* Set up for C function definitions, even when using C++ */
   26.60 +#ifdef __cplusplus
   26.61 +/* *INDENT-OFF* */
   26.62 +extern "C" {
   26.63 +/* *INDENT-ON* */
   26.64 +#endif
   26.65 +
   26.66 +/**
   26.67 + *  \file SDL_endian.h
   26.68 + *  
   26.69 + *  Uses inline functions for compilers that support them, and static
   26.70 + *  functions for those that do not.  Because these functions become
   26.71 + *  static for compilers that do not support inline functions, this
   26.72 + *  header should only be included in files that actually use them.
   26.73 + */
   26.74 +#if defined(__GNUC__) && defined(__i386__) && \
   26.75 +   !(__GNUC__ == 2 && __GNUC_MINOR__ == 95 /* broken gcc version */)
   26.76 +static __inline__ Uint16
   26.77 +SDL_Swap16(Uint16 x)
   26.78 +{
   26.79 +  __asm__("xchgb %b0,%h0": "=q"(x):"0"(x));
   26.80 +    return x;
   26.81 +}
   26.82 +#elif defined(__GNUC__) && defined(__x86_64__)
   26.83 +static __inline__ Uint16
   26.84 +SDL_Swap16(Uint16 x)
   26.85 +{
   26.86 +  __asm__("xchgb %b0,%h0": "=Q"(x):"0"(x));
   26.87 +    return x;
   26.88 +}
   26.89 +#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
   26.90 +static __inline__ Uint16
   26.91 +SDL_Swap16(Uint16 x)
   26.92 +{
   26.93 +    Uint16 result;
   26.94 +
   26.95 +  __asm__("rlwimi %0,%2,8,16,23": "=&r"(result):"0"(x >> 8), "r"(x));
   26.96 +    return result;
   26.97 +}
   26.98 +#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) && !defined(__mcoldfire__)
   26.99 +static __inline__ Uint16
  26.100 +SDL_Swap16(Uint16 x)
  26.101 +{
  26.102 +  __asm__("rorw #8,%0": "=d"(x): "0"(x):"cc");
  26.103 +    return x;
  26.104 +}
  26.105 +#else
  26.106 +static __inline__ Uint16
  26.107 +SDL_Swap16(Uint16 x)
  26.108 +{
  26.109 +    return SDL_static_cast(Uint16, ((x << 8) | (x >> 8)));
  26.110 +}
  26.111 +#endif
  26.112 +
  26.113 +#if defined(__GNUC__) && defined(__i386__)
  26.114 +static __inline__ Uint32
  26.115 +SDL_Swap32(Uint32 x)
  26.116 +{
  26.117 +  __asm__("bswap %0": "=r"(x):"0"(x));
  26.118 +    return x;
  26.119 +}
  26.120 +#elif defined(__GNUC__) && defined(__x86_64__)
  26.121 +static __inline__ Uint32
  26.122 +SDL_Swap32(Uint32 x)
  26.123 +{
  26.124 +  __asm__("bswapl %0": "=r"(x):"0"(x));
  26.125 +    return x;
  26.126 +}
  26.127 +#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
  26.128 +static __inline__ Uint32
  26.129 +SDL_Swap32(Uint32 x)
  26.130 +{
  26.131 +    Uint32 result;
  26.132 +
  26.133 +  __asm__("rlwimi %0,%2,24,16,23": "=&r"(result):"0"(x >> 24), "r"(x));
  26.134 +  __asm__("rlwimi %0,%2,8,8,15": "=&r"(result):"0"(result), "r"(x));
  26.135 +  __asm__("rlwimi %0,%2,24,0,7": "=&r"(result):"0"(result), "r"(x));
  26.136 +    return result;
  26.137 +}
  26.138 +#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) && !defined(__mcoldfire__)
  26.139 +static __inline__ Uint32
  26.140 +SDL_Swap32(Uint32 x)
  26.141 +{
  26.142 +  __asm__("rorw #8,%0\n\tswap %0\n\trorw #8,%0": "=d"(x): "0"(x):"cc");
  26.143 +    return x;
  26.144 +}
  26.145 +#else
  26.146 +static __inline__ Uint32
  26.147 +SDL_Swap32(Uint32 x)
  26.148 +{
  26.149 +    return SDL_static_cast(Uint32, ((x << 24) | ((x << 8) & 0x00FF0000) |
  26.150 +                                    ((x >> 8) & 0x0000FF00) | (x >> 24)));
  26.151 +}
  26.152 +#endif
  26.153 +
  26.154 +#ifdef SDL_HAS_64BIT_TYPE
  26.155 +#if defined(__GNUC__) && defined(__i386__)
  26.156 +static __inline__ Uint64
  26.157 +SDL_Swap64(Uint64 x)
  26.158 +{
  26.159 +    union
  26.160 +    {
  26.161 +        struct
  26.162 +        {
  26.163 +            Uint32 a, b;
  26.164 +        } s;
  26.165 +        Uint64 u;
  26.166 +    } v;
  26.167 +    v.u = x;
  26.168 +  __asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1": "=r"(v.s.a), "=r"(v.s.b):"0"(v.s.a),
  26.169 +            "1"(v.s.
  26.170 +                b));
  26.171 +    return v.u;
  26.172 +}
  26.173 +#elif defined(__GNUC__) && defined(__x86_64__)
  26.174 +static __inline__ Uint64
  26.175 +SDL_Swap64(Uint64 x)
  26.176 +{
  26.177 +  __asm__("bswapq %0": "=r"(x):"0"(x));
  26.178 +    return x;
  26.179 +}
  26.180 +#else
  26.181 +static __inline__ Uint64
  26.182 +SDL_Swap64(Uint64 x)
  26.183 +{
  26.184 +    Uint32 hi, lo;
  26.185 +
  26.186 +    /* Separate into high and low 32-bit values and swap them */
  26.187 +    lo = SDL_static_cast(Uint32, x & 0xFFFFFFFF);
  26.188 +    x >>= 32;
  26.189 +    hi = SDL_static_cast(Uint32, x & 0xFFFFFFFF);
  26.190 +    x = SDL_Swap32(lo);
  26.191 +    x <<= 32;
  26.192 +    x |= SDL_Swap32(hi);
  26.193 +    return (x);
  26.194 +}
  26.195 +#endif
  26.196 +#else
  26.197 +/**
  26.198 + *  This is mainly to keep compilers from complaining in SDL code.
  26.199 + *  If there is no real 64-bit datatype, then compilers will complain about
  26.200 + *  the fake 64-bit datatype that SDL provides when it compiles user code.
  26.201 + */
  26.202 +#define SDL_Swap64(X)	(X)
  26.203 +#endif /* SDL_HAS_64BIT_TYPE */
  26.204 +
  26.205 +
  26.206 +static __inline__ float
  26.207 +SDL_SwapFloat(float x)
  26.208 +{
  26.209 +    union
  26.210 +    {
  26.211 +        float f;
  26.212 +        Uint32 ui32;
  26.213 +    } swapper;
  26.214 +    swapper.f = x;
  26.215 +    swapper.ui32 = SDL_Swap32(swapper.ui32);
  26.216 +    return swapper.f;
  26.217 +}
  26.218 +
  26.219 +
  26.220 +/**
  26.221 + *  \name Swap to native
  26.222 + *  Byteswap item from the specified endianness to the native endianness.
  26.223 + */
  26.224 +/*@{*/
  26.225 +#if SDL_BYTEORDER == SDL_LIL_ENDIAN
  26.226 +#define SDL_SwapLE16(X)	(X)
  26.227 +#define SDL_SwapLE32(X)	(X)
  26.228 +#define SDL_SwapLE64(X)	(X)
  26.229 +#define SDL_SwapFloatLE(X)	(X)
  26.230 +#define SDL_SwapBE16(X)	SDL_Swap16(X)
  26.231 +#define SDL_SwapBE32(X)	SDL_Swap32(X)
  26.232 +#define SDL_SwapBE64(X)	SDL_Swap64(X)
  26.233 +#define SDL_SwapFloatBE(X)	SDL_SwapFloat(X)
  26.234 +#else
  26.235 +#define SDL_SwapLE16(X)	SDL_Swap16(X)
  26.236 +#define SDL_SwapLE32(X)	SDL_Swap32(X)
  26.237 +#define SDL_SwapLE64(X)	SDL_Swap64(X)
  26.238 +#define SDL_SwapFloatLE(X)	SDL_SwapFloat(X)
  26.239 +#define SDL_SwapBE16(X)	(X)
  26.240 +#define SDL_SwapBE32(X)	(X)
  26.241 +#define SDL_SwapBE64(X)	(X)
  26.242 +#define SDL_SwapFloatBE(X)	(X)
  26.243 +#endif
  26.244 +/*@}*//*Swap to native*/
  26.245 +
  26.246 +/* Ends C function definitions when using C++ */
  26.247 +#ifdef __cplusplus
  26.248 +/* *INDENT-OFF* */
  26.249 +}
  26.250 +/* *INDENT-ON* */
  26.251 +#endif
  26.252 +#include "close_code.h"
  26.253 +
  26.254 +#endif /* _SDL_endian_h */
  26.255 +
  26.256 +/* vi: set ts=4 sw=4 expandtab: */
    27.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    27.2 +++ b/touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_error.h	Sat Jul 31 01:24:50 2010 +0400
    27.3 @@ -0,0 +1,78 @@
    27.4 +/*
    27.5 +    SDL - Simple DirectMedia Layer
    27.6 +    Copyright (C) 1997-2010 Sam Lantinga
    27.7 +
    27.8 +    This library is free software; you can redistribute it and/or
    27.9 +    modify it under the terms of the GNU Lesser General Public
   27.10 +    License as published by the Free Software Foundation; either
   27.11 +    version 2.1 of the License, or (at your option) any later version.
   27.12 +
   27.13 +    This library is distributed in the hope that it will be useful,
   27.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   27.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   27.16 +    Lesser General Public License for more details.
   27.17 +
   27.18 +    You should have received a copy of the GNU Lesser General Public
   27.19 +    License along with this library; if not, write to the Free Software
   27.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   27.21 +
   27.22 +    Sam Lantinga
   27.23 +    slouken@libsdl.org
   27.24 +*/
   27.25 +
   27.26 +/**
   27.27 + *  \file SDL_error.h
   27.28 + *  
   27.29 + *  Simple error message routines for SDL.
   27.30 + */
   27.31 +
   27.32 +#ifndef _SDL_error_h
   27.33 +#define _SDL_error_h
   27.34 +
   27.35 +#include "SDL_stdinc.h"
   27.36 +
   27.37 +#include "begin_code.h"
   27.38 +/* Set up for C function definitions, even when using C++ */
   27.39 +#ifdef __cplusplus
   27.40 +/* *INDENT-OFF* */
   27.41 +extern "C" {
   27.42 +/* *INDENT-ON* */
   27.43 +#endif
   27.44 +
   27.45 +/* Public functions */
   27.46 +extern DECLSPEC void SDLCALL SDL_SetError(const char *fmt, ...);
   27.47 +extern DECLSPEC char *SDLCALL SDL_GetError(void);
   27.48 +extern DECLSPEC void SDLCALL SDL_ClearError(void);
   27.49 +
   27.50 +/**
   27.51 + *  \name Internal error functions
   27.52 + *  
   27.53 + *  \internal 
   27.54 + *  Private error message function - used internally.
   27.55 + */
   27.56 +/*@{*/
   27.57 +#define SDL_OutOfMemory()	SDL_Error(SDL_ENOMEM)
   27.58 +#define SDL_Unsupported()	SDL_Error(SDL_UNSUPPORTED)
   27.59 +typedef enum
   27.60 +{
   27.61 +    SDL_ENOMEM,
   27.62 +    SDL_EFREAD,
   27.63 +    SDL_EFWRITE,
   27.64 +    SDL_EFSEEK,
   27.65 +    SDL_UNSUPPORTED,
   27.66 +    SDL_LASTERROR
   27.67 +} SDL_errorcode;
   27.68 +extern DECLSPEC void SDLCALL SDL_Error(SDL_errorcode code);
   27.69 +/*@}*//*Internal error functions*/
   27.70 +
   27.71 +/* Ends C function definitions when using C++ */
   27.72 +#ifdef __cplusplus
   27.73 +/* *INDENT-OFF* */
   27.74 +}
   27.75 +/* *INDENT-ON* */
   27.76 +#endif
   27.77 +#include "close_code.h"
   27.78 +
   27.79 +#endif /* _SDL_error_h */
   27.80 +
   27.81 +/* vi: set ts=4 sw=4 expandtab: */
    28.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    28.2 +++ b/touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_events.h	Sat Jul 31 01:24:50 2010 +0400
    28.3 @@ -0,0 +1,624 @@
    28.4 +/*
    28.5 +    SDL - Simple DirectMedia Layer
    28.6 +    Copyright (C) 1997-2010 Sam Lantinga
    28.7 +
    28.8 +    This library is free software; you can redistribute it and/or
    28.9 +    modify it under the terms of the GNU Lesser General Public
   28.10 +    License as published by the Free Software Foundation; either
   28.11 +    version 2.1 of the License, or (at your option) any later version.
   28.12 +
   28.13 +    This library is distributed in the hope that it will be useful,
   28.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   28.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   28.16 +    Lesser General Public License for more details.
   28.17 +
   28.18 +    You should have received a copy of the GNU Lesser General Public
   28.19 +    License along with this library; if not, write to the Free Software
   28.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   28.21 +
   28.22 +    Sam Lantinga
   28.23 +    slouken@libsdl.org
   28.24 +*/
   28.25 +
   28.26 +/**
   28.27 + *  \file SDL_events.h
   28.28 + *  
   28.29 + *  Include file for SDL event handling.
   28.30 + */
   28.31 +
   28.32 +#ifndef _SDL_events_h
   28.33 +#define _SDL_events_h
   28.34 +
   28.35 +#include "SDL_stdinc.h"
   28.36 +#include "SDL_error.h"
   28.37 +#include "SDL_video.h"
   28.38 +#include "SDL_keyboard.h"
   28.39 +#include "SDL_mouse.h"
   28.40 +#include "SDL_joystick.h"
   28.41 +#include "SDL_quit.h"
   28.42 +#include "SDL_gesture.h"
   28.43 +#include "SDL_touch.h"
   28.44 +
   28.45 +#include "begin_code.h"
   28.46 +/* Set up for C function definitions, even when using C++ */
   28.47 +#ifdef __cplusplus
   28.48 +/* *INDENT-OFF* */
   28.49 +extern "C" {
   28.50 +/* *INDENT-ON* */
   28.51 +#endif
   28.52 +
   28.53 +/* General keyboard/mouse state definitions */
   28.54 +#define SDL_RELEASED	0
   28.55 +#define SDL_PRESSED	1
   28.56 +
   28.57 +/**
   28.58 + * \brief The types of events that can be delivered.
   28.59 + */
   28.60 +typedef enum
   28.61 +{
   28.62 +    SDL_FIRSTEVENT     = 0,     /**< Unused (do not remove) */
   28.63 +
   28.64 +    /* Application events */
   28.65 +    SDL_QUIT           = 0x100, /**< User-requested quit */
   28.66 +
   28.67 +    /* Window events */
   28.68 +    SDL_WINDOWEVENT    = 0x200, /**< Window state change */
   28.69 +    SDL_SYSWMEVENT,             /**< System specific event */
   28.70 +
   28.71 +    /* Keyboard events */
   28.72 +    SDL_KEYDOWN        = 0x300, /**< Keys pressed */
   28.73 +    SDL_KEYUP,                  /**< Keys released */
   28.74 +    SDL_TEXTEDITING,            /**< Keyboard text editing (composition) */
   28.75 +    SDL_TEXTINPUT,              /**< Keyboard text input */
   28.76 +
   28.77 +    /* Mouse events */
   28.78 +    SDL_MOUSEMOTION    = 0x400, /**< Mouse moved */
   28.79 +    SDL_MOUSEBUTTONDOWN,        /**< Mouse button pressed */
   28.80 +    SDL_MOUSEBUTTONUP,          /**< Mouse button released */
   28.81 +    SDL_MOUSEWHEEL,             /**< Mouse wheel motion */
   28.82 +
   28.83 +    /* Tablet or multiple mice input device events */
   28.84 +    SDL_INPUTMOTION    = 0x500, /**< Input moved */
   28.85 +    SDL_INPUTBUTTONDOWN,        /**< Input button pressed */
   28.86 +    SDL_INPUTBUTTONUP,          /**< Input button released */
   28.87 +    SDL_INPUTWHEEL,             /**< Input wheel motion */
   28.88 +    SDL_INPUTPROXIMITYIN,       /**< Input pen entered proximity */
   28.89 +    SDL_INPUTPROXIMITYOUT,      /**< Input pen left proximity */
   28.90 +
   28.91 +    /* Joystick events */
   28.92 +    SDL_JOYAXISMOTION  = 0x600, /**< Joystick axis motion */
   28.93 +    SDL_JOYBALLMOTION,          /**< Joystick trackball motion */
   28.94 +    SDL_JOYHATMOTION,           /**< Joystick hat position change */
   28.95 +    SDL_JOYBUTTONDOWN,          /**< Joystick button pressed */
   28.96 +    SDL_JOYBUTTONUP,            /**< Joystick button released */
   28.97 +
   28.98 +    /* Touch events */
   28.99 +    SDL_FINGERDOWN      = 0x700,
  28.100 +    SDL_FINGERUP,
  28.101 +    SDL_FINGERMOTION,
  28.102 +    SDL_TOUCHBUTTONDOWN,
  28.103 +    SDL_TOUCHBUTTONUP,    
  28.104 +
  28.105 +    /* Gesture events */
  28.106 +    SDL_DOLLARGESTURE   = 0x800,
  28.107 +    SDL_DOLLARRECORD,
  28.108 +    SDL_MULTIGESTURE,
  28.109 +
  28.110 +    /* Clipboard events */
  28.111 +
  28.112 +    SDL_CLIPBOARDUPDATE = 0x900, /**< The clipboard changed */
  28.113 +
  28.114 +    /* Obsolete events */
  28.115 +    SDL_EVENT_COMPAT1 = 0x7000, /**< SDL 1.2 events for compatibility */
  28.116 +    SDL_EVENT_COMPAT2,
  28.117 +    SDL_EVENT_COMPAT3,
  28.118 +
  28.119 +
  28.120 +    /** Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use,
  28.121 +     *  and should be allocated with SDL_RegisterEvents()
  28.122 +     */
  28.123 +    SDL_USEREVENT    = 0x8000,
  28.124 +
  28.125 +    /**
  28.126 +     *  This last event is only for bounding internal arrays
  28.127 +     */
  28.128 +    SDL_LASTEVENT    = 0xFFFF
  28.129 +} SDL_EventType;
  28.130 +
  28.131 +/**
  28.132 + *  \brief Window state change event data (event.window.*)
  28.133 + */
  28.134 +typedef struct SDL_WindowEvent
  28.135 +{
  28.136 +    Uint32 type;        /**< ::SDL_WINDOWEVENT */
  28.137 +    Uint32 windowID;    /**< The associated window */
  28.138 +    Uint8 event;        /**< ::SDL_WindowEventID */
  28.139 +    Uint8 padding1;
  28.140 +    Uint8 padding2;
  28.141 +    Uint8 padding3;
  28.142 +    int data1;          /**< event dependent data */
  28.143 +    int data2;          /**< event dependent data */
  28.144 +} SDL_WindowEvent;
  28.145 +
  28.146 +/**
  28.147 + *  \brief Keyboard button event structure (event.key.*)
  28.148 + */
  28.149 +typedef struct SDL_KeyboardEvent
  28.150 +{
  28.151 +    Uint32 type;        /**< ::SDL_KEYDOWN or ::SDL_KEYUP */
  28.152 +    Uint32 windowID;    /**< The window with keyboard focus, if any */
  28.153 +    Uint8 state;        /**< ::SDL_PRESSED or ::SDL_RELEASED */
  28.154 +    Uint8 padding1;
  28.155 +    Uint8 padding2;
  28.156 +    Uint8 padding3;
  28.157 +    SDL_keysym keysym;  /**< The key that was pressed or released */
  28.158 +} SDL_KeyboardEvent;
  28.159 +
  28.160 +#define SDL_TEXTEDITINGEVENT_TEXT_SIZE (32)
  28.161 +/**
  28.162 + *  \brief Keyboard text editing event structure (event.edit.*)
  28.163 + */
  28.164 +typedef struct SDL_TextEditingEvent
  28.165 +{
  28.166 +    Uint32 type;                                /**< ::SDL_TEXTEDITING */
  28.167 +    Uint32 windowID;                            /**< The window with keyboard focus, if any */
  28.168 +    char text[SDL_TEXTEDITINGEVENT_TEXT_SIZE];  /**< The editing text */
  28.169 +    int start;                                  /**< The start cursor of selected editing text */
  28.170 +    int length;                                 /**< The length of selected editing text */
  28.171 +} SDL_TextEditingEvent;
  28.172 +
  28.173 +
  28.174 +#define SDL_TEXTINPUTEVENT_TEXT_SIZE (32)
  28.175 +/**
  28.176 + *  \brief Keyboard text input event structure (event.text.*)
  28.177 + */
  28.178 +typedef struct SDL_TextInputEvent
  28.179 +{
  28.180 +    Uint32 type;                              /**< ::SDL_TEXTINPUT */
  28.181 +    Uint32 windowID;                          /**< The window with keyboard focus, if any */
  28.182 +    char text[SDL_TEXTINPUTEVENT_TEXT_SIZE];  /**< The input text */
  28.183 +} SDL_TextInputEvent;
  28.184 +
  28.185 +/**
  28.186 + *  \brief Mouse motion event structure (event.motion.*)
  28.187 + */
  28.188 +typedef struct SDL_MouseMotionEvent
  28.189 +{
  28.190 +    Uint32 type;        /**< ::SDL_MOUSEMOTION */
  28.191 +    Uint32 windowID;    /**< The window with mouse focus, if any */
  28.192 +    Uint8 state;        /**< The current button state */
  28.193 +    Uint8 padding1;
  28.194 +    Uint8 padding2;
  28.195 +    Uint8 padding3;
  28.196 +    int x;              /**< X coordinate, relative to window */
  28.197 +    int y;              /**< Y coordinate, relative to window */
  28.198 +    int xrel;           /**< The relative motion in the X direction */
  28.199 +    int yrel;           /**< The relative motion in the Y direction */
  28.200 +} SDL_MouseMotionEvent;
  28.201 +
  28.202 +/**
  28.203 + *  \brief Mouse button event structure (event.button.*)
  28.204 + */
  28.205 +typedef struct SDL_MouseButtonEvent
  28.206 +{
  28.207 +    Uint32 type;        /**< ::SDL_MOUSEBUTTONDOWN or ::SDL_MOUSEBUTTONUP */
  28.208 +    Uint32 windowID;    /**< The window with mouse focus, if any */
  28.209 +    Uint8 button;       /**< The mouse button index */
  28.210 +    Uint8 state;        /**< ::SDL_PRESSED or ::SDL_RELEASED */
  28.211 +    Uint8 padding1;
  28.212 +    Uint8 padding2;
  28.213 +    int x;              /**< X coordinate, relative to window */
  28.214 +    int y;              /**< Y coordinate, relative to window */
  28.215 +} SDL_MouseButtonEvent;
  28.216 +
  28.217 +/**
  28.218 + *  \brief Mouse wheel event structure (event.wheel.*)
  28.219 + */
  28.220 +typedef struct SDL_MouseWheelEvent
  28.221 +{
  28.222 +    Uint32 type;        /**< ::SDL_MOUSEWHEEL */
  28.223 +    Uint32 windowID;    /**< The window with mouse focus, if any */
  28.224 +    int x;              /**< The amount scrolled horizontally */
  28.225 +    int y;              /**< The amount scrolled vertically */
  28.226 +} SDL_MouseWheelEvent;
  28.227 +
  28.228 +/**
  28.229 + *  \brief Joystick axis motion event structure (event.jaxis.*)
  28.230 + */
  28.231 +typedef struct SDL_JoyAxisEvent
  28.232 +{
  28.233 +    Uint32 type;        /**< ::SDL_JOYAXISMOTION */
  28.234 +    Uint8 which;        /**< The joystick device index */
  28.235 +    Uint8 axis;         /**< The joystick axis index */
  28.236 +    Uint8 padding1;
  28.237 +    Uint8 padding2;
  28.238 +    int value;          /**< The axis value (range: -32768 to 32767) */
  28.239 +} SDL_JoyAxisEvent;
  28.240 +
  28.241 +/**
  28.242 + *  \brief Joystick trackball motion event structure (event.jball.*)
  28.243 + */
  28.244 +typedef struct SDL_JoyBallEvent
  28.245 +{
  28.246 +    Uint32 type;        /**< ::SDL_JOYBALLMOTION */
  28.247 +    Uint8 which;        /**< The joystick device index */
  28.248 +    Uint8 ball;         /**< The joystick trackball index */
  28.249 +    Uint8 padding1;
  28.250 +    Uint8 padding2;
  28.251 +    int xrel;           /**< The relative motion in the X direction */
  28.252 +    int yrel;           /**< The relative motion in the Y direction */
  28.253 +} SDL_JoyBallEvent;
  28.254 +
  28.255 +/**
  28.256 + *  \brief Joystick hat position change event structure (event.jhat.*)
  28.257 + */
  28.258 +typedef struct SDL_JoyHatEvent
  28.259 +{
  28.260 +    Uint32 type;        /**< ::SDL_JOYHATMOTION */
  28.261 +    Uint8 which;        /**< The joystick device index */
  28.262 +    Uint8 hat;          /**< The joystick hat index */
  28.263 +    Uint8 value;        /**< The hat position value.
  28.264 +                         *   \sa ::SDL_HAT_LEFTUP ::SDL_HAT_UP ::SDL_HAT_RIGHTUP
  28.265 +                         *   \sa ::SDL_HAT_LEFT ::SDL_HAT_CENTERED ::SDL_HAT_RIGHT
  28.266 +                         *   \sa ::SDL_HAT_LEFTDOWN ::SDL_HAT_DOWN ::SDL_HAT_RIGHTDOWN
  28.267 +                         *   
  28.268 +                         *   Note that zero means the POV is centered.
  28.269 +                         */
  28.270 +    Uint8 padding1;
  28.271 +} SDL_JoyHatEvent;
  28.272 +
  28.273 +/**
  28.274 + *  \brief Joystick button event structure (event.jbutton.*)
  28.275 + */
  28.276 +typedef struct SDL_JoyButtonEvent
  28.277 +{
  28.278 +    Uint32 type;        /**< ::SDL_JOYBUTTONDOWN or ::SDL_JOYBUTTONUP */
  28.279 +    Uint8 which;        /**< The joystick device index */
  28.280 +    Uint8 button;       /**< The joystick button index */
  28.281 +    Uint8 state;        /**< ::SDL_PRESSED or ::SDL_RELEASED */
  28.282 +    Uint8 padding1;
  28.283 +} SDL_JoyButtonEvent;
  28.284 +
  28.285 +
  28.286 +/**
  28.287 + *  \brief Touch finger motion/finger event structure (event.tmotion.*)
  28.288 + */
  28.289 +typedef struct SDL_TouchFingerEvent
  28.290 +{
  28.291 +    Uint32 type;        /**< ::SDL_FINGERMOTION OR 
  28.292 +			   SDL_FINGERDOWN OR SDL_FINGERUP*/
  28.293 +    Uint32 windowID;    /**< The window with mouse focus, if any */
  28.294 +    long touchId;        /**< The touch device id */
  28.295 +    long fingerId;
  28.296 +    Uint8 state;        /**< The current button state */
  28.297 +    Uint8 padding1;
  28.298 +    Uint8 padding2;
  28.299 +    Uint8 padding3;
  28.300 +    float x;
  28.301 +    float y;
  28.302 +    int pressure;
  28.303 +} SDL_TouchFingerEvent;
  28.304 +
  28.305 +
  28.306 +/**
  28.307 + *  \brief Touch finger motion/finger event structure (event.tmotion.*)
  28.308 + */
  28.309 +typedef struct SDL_TouchButtonEvent
  28.310 +{
  28.311 +    Uint32 type;        /**< ::SDL_TOUCHBUTTONUP OR SDL_TOUCHBUTTONDOWN */
  28.312 +    Uint32 windowID;    /**< The window with mouse focus, if any */
  28.313 +    long touchId;        /**< The touch device index */
  28.314 +    Uint8 state;        /**< The current button state */
  28.315 +    Uint8 button;        /**< The button changing state */
  28.316 +    Uint8 padding1;
  28.317 +    Uint8 padding2;
  28.318 +} SDL_TouchButtonEvent;
  28.319 +
  28.320 +
  28.321 +
  28.322 +/**
  28.323 + *  \brief Multiple Finger Gesture Event
  28.324 + */
  28.325 +typedef struct SDL_MultiGestureEvent
  28.326 +{
  28.327 +    Uint32 type;        /**< ::SDL_MULTIGESTURE */
  28.328 +    Uint32 windowID;    /**< The window with mouse focus, if any */
  28.329 +    long touchId;        /**< The touch device index */
  28.330 +    float dTheta;
  28.331 +    float dDist;
  28.332 +    float x;  //currently 0...1. Change to screen coords?
  28.333 +    float y;  
  28.334 +
  28.335 +} SDL_MultiGestureEvent;
  28.336 +
  28.337 +typedef struct SDL_DollarGestureEvent
  28.338 +{
  28.339 +    Uint32 type;        /**< ::SDL_DOLLARGESTURE */
  28.340 +    Uint32 windowID;    /**< The window with mouse focus, if any */
  28.341 +    long touchId;        /**< The touch device index */
  28.342 +    unsigned long gestureId;
  28.343 +    float error;
  28.344 +  /*
  28.345 +    //TODO: Enable to give location?
  28.346 +    float x;  //currently 0...1. Change to screen coords?
  28.347 +    float y;  
  28.348 +  */
  28.349 +} SDL_DollarGestureEvent;
  28.350 +
  28.351 +
  28.352 +
  28.353 +
  28.354 +/**
  28.355 + *  \brief The "quit requested" event
  28.356 + */
  28.357 +typedef struct SDL_QuitEvent
  28.358 +{
  28.359 +    Uint32 type;        /**< ::SDL_QUIT */
  28.360 +} SDL_QuitEvent;
  28.361 +
  28.362 +/**
  28.363 + *  \brief A user-defined event type (event.user.*)
  28.364 + */
  28.365 +typedef struct SDL_UserEvent
  28.366 +{
  28.367 +    Uint32 type;        /**< ::SDL_USEREVENT through ::SDL_NUMEVENTS-1 */
  28.368 +    Uint32 windowID;    /**< The associated window if any */
  28.369 +    int code;           /**< User defined event code */
  28.370 +    void *data1;        /**< User defined data pointer */
  28.371 +    void *data2;        /**< User defined data pointer */
  28.372 +} SDL_UserEvent;
  28.373 +
  28.374 +struct SDL_SysWMmsg;
  28.375 +typedef struct SDL_SysWMmsg SDL_SysWMmsg;
  28.376 +
  28.377 +/**
  28.378 + *  \brief A video driver dependent system event (event.syswm.*)
  28.379 + *  
  28.380 + *  \note If you want to use this event, you should include SDL_syswm.h.
  28.381 + */
  28.382 +typedef struct SDL_SysWMEvent
  28.383 +{
  28.384 +    Uint32 type;        /**< ::SDL_SYSWMEVENT */
  28.385 +    SDL_SysWMmsg *msg;  /**< driver dependent data, defined in SDL_syswm.h */
  28.386 +} SDL_SysWMEvent;
  28.387 +
  28.388 +#ifndef SDL_NO_COMPAT
  28.389 +/**
  28.390 + *  \addtogroup Compatibility 
  28.391 + */
  28.392 +/*@{*/
  28.393 +
  28.394 +/**
  28.395 + *  \name Typedefs for backwards compatibility
  28.396 + */
  28.397 +/*@{*/
  28.398 +typedef struct SDL_ActiveEvent
  28.399 +{
  28.400 +    Uint32 type;
  28.401 +    Uint8 gain;
  28.402 +    Uint8 state;
  28.403 +} SDL_ActiveEvent;
  28.404 +
  28.405 +typedef struct SDL_ResizeEvent
  28.406 +{
  28.407 +    Uint32 type;
  28.408 +    int w;
  28.409 +    int h;
  28.410 +} SDL_ResizeEvent;
  28.411 +/*@}*/
  28.412 +
  28.413 +/*@}*//*Compatibility*/
  28.414 +#endif
  28.415 +
  28.416 +/**
  28.417 + *  \brief General event structure
  28.418 + */
  28.419 +typedef union SDL_Event
  28.420 +{
  28.421 +    Uint32 type;                    /**< Event type, shared with all events */
  28.422 +    SDL_WindowEvent window;         /**< Window event data */
  28.423 +    SDL_KeyboardEvent key;          /**< Keyboard event data */
  28.424 +    SDL_TextEditingEvent edit;      /**< Text editing event data */
  28.425 +    SDL_TextInputEvent text;        /**< Text input event data */
  28.426 +    SDL_MouseMotionEvent motion;    /**< Mouse motion event data */
  28.427 +    SDL_MouseButtonEvent button;    /**< Mouse button event data */
  28.428 +    SDL_MouseWheelEvent wheel;      /**< Mouse wheel event data */
  28.429 +    SDL_JoyAxisEvent jaxis;         /**< Joystick axis event data */
  28.430 +    SDL_JoyBallEvent jball;         /**< Joystick ball event data */
  28.431 +    SDL_JoyHatEvent jhat;           /**< Joystick hat event data */
  28.432 +    SDL_JoyButtonEvent jbutton;     /**< Joystick button event data */
  28.433 +    SDL_QuitEvent quit;             /**< Quit request event data */
  28.434 +    SDL_UserEvent user;             /**< Custom event data */
  28.435 +    SDL_SysWMEvent syswm;           /**< System dependent window event data */
  28.436 +    SDL_TouchFingerEvent tfinger;   /**< Touch finger event data */
  28.437 +    SDL_TouchButtonEvent tbutton;   /**< Touch button event data */
  28.438 +    SDL_MultiGestureEvent mgesture; /**< Multi Finger Gesture data*/
  28.439 +    SDL_DollarGestureEvent dgesture; /**< Multi Finger Gesture data*/
  28.440 +
  28.441 +    /** Temporarily here for backwards compatibility */
  28.442 +    /*@{*/
  28.443 +#ifndef SDL_NO_COMPAT
  28.444 +    SDL_ActiveEvent active;
  28.445 +    SDL_ResizeEvent resize;
  28.446 +#endif
  28.447 +    /*@}*/
  28.448 +} SDL_Event;
  28.449 +
  28.450 +
  28.451 +/* Function prototypes */
  28.452 +
  28.453 +/**
  28.454 + *  Pumps the event loop, gathering events from the input devices.
  28.455 + *  
  28.456 + *  This function updates the event queue and internal input device state.
  28.457 + *  
  28.458 + *  This should only be run in the thread that sets the video mode.
  28.459 + */
  28.460 +extern DECLSPEC void SDLCALL SDL_PumpEvents(void);
  28.461 +
  28.462 +/*@{*/
  28.463 +typedef enum
  28.464 +{
  28.465 +    SDL_ADDEVENT,
  28.466 +    SDL_PEEKEVENT,
  28.467 +    SDL_GETEVENT
  28.468 +} SDL_eventaction;
  28.469 +
  28.470 +/**
  28.471 + *  Checks the event queue for messages and optionally returns them.
  28.472 + *  
  28.473 + *  If \c action is ::SDL_ADDEVENT, up to \c numevents events will be added to
  28.474 + *  the back of the event queue.
  28.475 + *  
  28.476 + *  If \c action is ::SDL_PEEKEVENT, up to \c numevents events at the front
  28.477 + *  of the event queue, matching \c mask, will be returned and will not
  28.478 + *  be removed from the queue.
  28.479 + *  
  28.480 + *  If \c action is ::SDL_GETEVENT, up to \c numevents events at the front 
  28.481 + *  of the event queue, matching \c mask, will be returned and will be
  28.482 + *  removed from the queue.
  28.483 + *  
  28.484 + *  \return The number of events actually stored, or -1 if there was an error.
  28.485 + *  
  28.486 + *  This function is thread-safe.
  28.487 + */
  28.488 +extern DECLSPEC int SDLCALL SDL_PeepEvents(SDL_Event * events, int numevents,
  28.489 +                                           SDL_eventaction action,
  28.490 +                                           Uint32 minType, Uint32 maxType);
  28.491 +/*@}*/
  28.492 +
  28.493 +/**
  28.494 + *  Checks to see if certain event types are in the event queue.
  28.495 + */
  28.496 +extern DECLSPEC SDL_bool SDLCALL SDL_HasEvent(Uint32 type);
  28.497 +extern DECLSPEC SDL_bool SDLCALL SDL_HasEvents(Uint32 minType, Uint32 maxType);
  28.498 +
  28.499 +/**
  28.500 + *  This function clears events from the event queue
  28.501 + */
  28.502 +extern DECLSPEC void SDLCALL SDL_FlushEvent(Uint32 type);
  28.503 +extern DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType);
  28.504 +
  28.505 +/**
  28.506 + *  \brief Polls for currently pending events.
  28.507 + *  
  28.508 + *  \return 1 if there are any pending events, or 0 if there are none available.
  28.509 + *  
  28.510 + *  \param event If not NULL, the next event is removed from the queue and 
  28.511 + *               stored in that area.
  28.512 + */
  28.513 +extern DECLSPEC int SDLCALL SDL_PollEvent(SDL_Event * event);
  28.514 +
  28.515 +/**
  28.516 + *  \brief Waits indefinitely for the next available event.
  28.517 + *  
  28.518 + *  \return 1, or 0 if there was an error while waiting for events.
  28.519 + *   
  28.520 + *  \param event If not NULL, the next event is removed from the queue and 
  28.521 + *               stored in that area.
  28.522 + */
  28.523 +extern DECLSPEC int SDLCALL SDL_WaitEvent(SDL_Event * event);
  28.524 +
  28.525 +/**
  28.526 + *  \brief Waits until the specified timeout (in milliseconds) for the next 
  28.527 + *         available event.
  28.528 + *  
  28.529 + *  \return 1, or 0 if there was an error while waiting for events.
  28.530 + *  
  28.531 + *  \param event If not NULL, the next event is removed from the queue and 
  28.532 + *               stored in that area.
  28.533 + */
  28.534 +extern DECLSPEC int SDLCALL SDL_WaitEventTimeout(SDL_Event * event,
  28.535 +                                                 int timeout);
  28.536 +
  28.537 +/**
  28.538 + *  \brief Add an event to the event queue.
  28.539 + *  
  28.540 + *  \return 1 on success, 0 if the event was filtered, or -1 if the event queue 
  28.541 + *          was full or there was some other error.
  28.542 + */
  28.543 +extern DECLSPEC int SDLCALL SDL_PushEvent(SDL_Event * event);
  28.544 +
  28.545 +typedef int (SDLCALL * SDL_EventFilter) (void *userdata, SDL_Event * event);
  28.546 +
  28.547 +/**
  28.548 + *  Sets up a filter to process all events before they change internal state and
  28.549 + *  are posted to the internal event queue.
  28.550 + *  
  28.551 + *  The filter is protypted as:
  28.552 + *  \code
  28.553 + *      int SDL_EventFilter(void *userdata, SDL_Event * event);
  28.554 + *  \endcode
  28.555 + *
  28.556 + *  If the filter returns 1, then the event will be added to the internal queue.
  28.557 + *  If it returns 0, then the event will be dropped from the queue, but the 
  28.558 + *  internal state will still be updated.  This allows selective filtering of
  28.559 + *  dynamically arriving events.
  28.560 + *  
  28.561 + *  \warning  Be very careful of what you do in the event filter function, as 
  28.562 + *            it may run in a different thread!
  28.563 + *  
  28.564 + *  There is one caveat when dealing with the ::SDL_QUITEVENT event type.  The
  28.565 + *  event filter is only called when the window manager desires to close the
  28.566 + *  application window.  If the event filter returns 1, then the window will
  28.567 + *  be closed, otherwise the window will remain open if possible.
  28.568 + *
  28.569 + *  If the quit event is generated by an interrupt signal, it will bypass the
  28.570 + *  internal queue and be delivered to the application at the next event poll.
  28.571 + */
  28.572 +extern DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter filter,
  28.573 +                                                void *userdata);
  28.574 +
  28.575 +/**
  28.576 + *  Return the current event filter - can be used to "chain" filters.
  28.577 + *  If there is no event filter set, this function returns SDL_FALSE.
  28.578 + */
  28.579 +extern DECLSPEC SDL_bool SDLCALL SDL_GetEventFilter(SDL_EventFilter * filter,
  28.580 +                                                    void **userdata);
  28.581 +
  28.582 +/**
  28.583 + *  Run the filter function on the current event queue, removing any
  28.584 + *  events for which the filter returns 0.
  28.585 + */
  28.586 +extern DECLSPEC void SDLCALL SDL_FilterEvents(SDL_EventFilter filter,
  28.587 +                                              void *userdata);
  28.588 +
  28.589 +/*@{*/
  28.590 +#define SDL_QUERY	-1
  28.591 +#define SDL_IGNORE	 0
  28.592 +#define SDL_DISABLE	 0
  28.593 +#define SDL_ENABLE	 1
  28.594 +
  28.595 +/**
  28.596 + *  This function allows you to set the state of processing certain events.
  28.597 + *   - If \c state is set to ::SDL_IGNORE, that event will be automatically 
  28.598 + *     dropped from the event queue and will not event be filtered.
  28.599 + *   - If \c state is set to ::SDL_ENABLE, that event will be processed 
  28.600 + *     normally.
  28.601 + *   - If \c state is set to ::SDL_QUERY, SDL_EventState() will return the 
  28.602 + *     current processing state of the specified event.
  28.603 + */
  28.604 +extern DECLSPEC Uint8 SDLCALL SDL_EventState(Uint32 type, int state);
  28.605 +/*@}*/
  28.606 +#define SDL_GetEventState(type) SDL_EventState(type, SDL_QUERY)
  28.607 +
  28.608 +/**
  28.609 + *  This function allocates a set of user-defined events, and returns
  28.610 + *  the beginning event number for that set of events.
  28.611 + *
  28.612 + *  If there aren't enough user-defined events left, this function
  28.613 + *  returns (Uint32)-1
  28.614 + */
  28.615 +extern DECLSPEC Uint32 SDLCALL SDL_RegisterEvents(int numevents);
  28.616 +
  28.617 +/* Ends C function definitions when using C++ */
  28.618 +#ifdef __cplusplus
  28.619 +/* *INDENT-OFF* */
  28.620 +}
  28.621 +/* *INDENT-ON* */
  28.622 +#endif
  28.623 +#include "close_code.h"
  28.624 +
  28.625 +#endif /* _SDL_events_h */
  28.626 +
  28.627 +/* vi: set ts=4 sw=4 expandtab: */
    29.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    29.2 +++ b/touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_gesture.h	Sat Jul 31 01:24:50 2010 +0400
    29.3 @@ -0,0 +1,90 @@
    29.4 +/*
    29.5 +    SDL - Simple DirectMedia Layer
    29.6 +    Copyright (C) 1997-2010 Sam Lantinga
    29.7 +
    29.8 +    This library is free software; you can redistribute it and/or
    29.9 +    modify it under the terms of the GNU Lesser General Public
   29.10 +    License as published by the Free Software Foundation; either
   29.11 +    version 2.1 of the License, or (at your option) any later version.
   29.12 +
   29.13 +    This library is distributed in the hope that it will be useful,
   29.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   29.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   29.16 +    Lesser General Public License for more details.
   29.17 +
   29.18 +    You should have received a copy of the GNU Lesser General Public
   29.19 +    License along with this library; if not, write to the Free Software
   29.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   29.21 +
   29.22 +    Sam Lantinga
   29.23 +    slouken@libsdl.org
   29.24 +*/
   29.25 +
   29.26 +/**
   29.27 + *  \file SDL_gesture.h
   29.28 + *  
   29.29 + *  Include file for SDL gesture event handling.
   29.30 + */
   29.31 +
   29.32 +#ifndef _SDL_gesture_h
   29.33 +#define _SDL_gesture_h
   29.34 +
   29.35 +#include "SDL_stdinc.h"
   29.36 +#include "SDL_error.h"
   29.37 +#include "SDL_video.h"
   29.38 +
   29.39 +#include "begin_code.h"
   29.40 +/* Set up for C function definitions, even when using C++ */
   29.41 +#ifdef __cplusplus
   29.42 +/* *INDENT-OFF* */
   29.43 +extern "C" {
   29.44 +/* *INDENT-ON* */
   29.45 +#endif
   29.46 +
   29.47 +
   29.48 +/* Function prototypes */
   29.49 +
   29.50 +/**
   29.51 + *  \brief Begin Recording a gesture on the specified touch, or all touches (-1)
   29.52 + *
   29.53 + *
   29.54 + */
   29.55 +  extern DECLSPEC int SDLCALL SDL_RecordGesture(int touchId);
   29.56 +
   29.57 +
   29.58 +/**
   29.59 + *  \brief Save all currently loaded Dollar Gesture templates
   29.60 + *
   29.61 + *
   29.62 + */
   29.63 +  extern DECLSPEC int SDLCALL SDL_SaveAllDollarTemplates(SDL_RWops *src);
   29.64 +
   29.65 +/**
   29.66 + *  \brief Save a currently loaded Dollar Gesture template
   29.67 + *
   29.68 + *
   29.69 + */
   29.70 +  extern DECLSPEC int 
   29.71 +  SDLCALL SDL_SaveDollarTemplate(unsigned long gestureId,SDL_RWops *src);
   29.72 +
   29.73 +
   29.74 +/**
   29.75 + *  \brief Load Dollar Gesture templates from a file
   29.76 + *
   29.77 + *
   29.78 + */
   29.79 +  extern DECLSPEC int SDLCALL SDL_LoadDollarTemplates(int touchId, SDL_RWops *src);
   29.80 +
   29.81 +
   29.82 +
   29.83 +/* Ends C function definitions when using C++ */
   29.84 +#ifdef __cplusplus
   29.85 +/* *INDENT-OFF* */
   29.86 +}
   29.87 +/* *INDENT-ON* */
   29.88 +#endif
   29.89 +#include "close_code.h"
   29.90 +
   29.91 +#endif /* _SDL_gesture_h */
   29.92 +
   29.93 +/* vi: set ts=4 sw=4 expandtab: */
    30.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    30.2 +++ b/touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_haptic.h	Sat Jul 31 01:24:50 2010 +0400
    30.3 @@ -0,0 +1,1123 @@
    30.4 +/*
    30.5 +    SDL - Simple DirectMedia Layer
    30.6 +    Copyright (C) 2008 Edgar Simo
    30.7 +
    30.8 +    This library is free software; you can redistribute it and/or
    30.9 +    modify it under the terms of the GNU Lesser General Public
   30.10 +    License as published by the Free Software Foundation; either
   30.11 +    version 2.1 of the License, or (at your option) any later version.
   30.12 +
   30.13 +    This library is distributed in the hope that it will be useful,
   30.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   30.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   30.16 +    Lesser General Public License for more details.
   30.17 +
   30.18 +    You should have received a copy of the GNU Lesser General Public
   30.19 +    License along with this library; if not, write to the Free Software
   30.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   30.21 +
   30.22 +    Sam Lantinga
   30.23 +    slouken@libsdl.org
   30.24 +*/
   30.25 +
   30.26 +/**
   30.27 + *  \file SDL_haptic.h
   30.28 + *  
   30.29 + *  \brief The SDL Haptic subsystem allows you to control haptic (force feedback)
   30.30 + *         devices.
   30.31 + *  
   30.32 + *  The basic usage is as follows:
   30.33 + *   - Initialize the Subsystem (::SDL_INIT_HAPTIC).
   30.34 + *   - Open a Haptic Device.
   30.35 + *    - SDL_HapticOpen() to open from index.
   30.36 + *    - SDL_HapticOpenFromJoystick() to open from an existing joystick.
   30.37 + *   - Create an effect (::SDL_HapticEffect).
   30.38 + *   - Upload the effect with SDL_HapticNewEffect().
   30.39 + *   - Run the effect with SDL_HapticRunEffect().
   30.40 + *   - (optional) Free the effect with SDL_HapticDestroyEffect().
   30.41 + *   - Close the haptic device with SDL_HapticClose().
   30.42 + *
   30.43 + * \par Example:
   30.44 + * \code
   30.45 + * int test_haptic( SDL_Joystick * joystick ) {
   30.46 + *    SDL_Haptic *haptic;
   30.47 + *    SDL_HapticEffect effect;
   30.48 + *    int effect_id;
   30.49 + *
   30.50 + *    // Open the device
   30.51 + *    haptic = SDL_HapticOpenFromJoystick( joystick );
   30.52 + *    if (haptic == NULL) return -1; // Most likely joystick isn't haptic
   30.53 + *
   30.54 + *    // See if it can do sine waves
   30.55 + *    if ((SDL_HapticQuery(haptic) & SDL_HAPTIC_SINE)==0) {
   30.56 + *       SDL_HapticClose(haptic); // No sine effect
   30.57 + *       return -1;
   30.58 + *    }
   30.59 + *
   30.60 + *    // Create the effect
   30.61 + *    memset( &effect, 0, sizeof(SDL_HapticEffect) ); // 0 is safe default
   30.62 + *    effect.type = SDL_HAPTIC_SINE;
   30.63 + *    effect.periodic.direction.type = SDL_HAPTIC_POLAR; // Polar coordinates
   30.64 + *    effect.periodic.direction.dir[0] = 18000; // Force comes from south
   30.65 + *    effect.periodic.period = 1000; // 1000 ms
   30.66 + *    effect.periodic.magnitude = 20000; // 20000/32767 strength
   30.67 + *    effect.periodic.length = 5000; // 5 seconds long
   30.68 + *    effect.periodic.attack_length = 1000; // Takes 1 second to get max strength
   30.69 + *    effect.periodic.fade_length = 1000; // Takes 1 second to fade away
   30.70 + *
   30.71 + *    // Upload the effect
   30.72 + *    effect_id = SDL_HapticNewEffect( haptic, &effect );
   30.73 + *
   30.74 + *    // Test the effect
   30.75 + *    SDL_HapticRunEffect( haptic, effect_id, 1 );
   30.76 + *    SDL_Delay( 5000); // Wait for the effect to finish
   30.77 + *
   30.78 + *    // We destroy the effect, although closing the device also does this
   30.79 + *    SDL_HapticDestroyEffect( haptic, effect_id );
   30.80 + *
   30.81 + *    // Close the device
   30.82 + *    SDL_HapticClose(haptic);
   30.83 + *
   30.84 + *    return 0; // Success
   30.85 + * }
   30.86 + * \endcode
   30.87 + * \author Edgar Simo Serra
   30.88 + */
   30.89 +
   30.90 +#ifndef _SDL_haptic_h
   30.91 +#define _SDL_haptic_h
   30.92 +
   30.93 +#include "SDL_stdinc.h"
   30.94 +#include "SDL_error.h"
   30.95 +#include "SDL_joystick.h"
   30.96 +
   30.97 +#include "begin_code.h"
   30.98 +/* Set up for C function definitions, even when using C++ */
   30.99 +#ifdef __cplusplus
  30.100 +/* *INDENT-OFF* */
  30.101 +extern "C" {
  30.102 +   /* *INDENT-ON* */                                                         
  30.103 +#endif /* __cplusplus */
  30.104 +
  30.105 +/**
  30.106 + *  \typedef SDL_Haptic
  30.107 + *  
  30.108 + *  \brief The haptic structure used to identify an SDL haptic.
  30.109 + *  
  30.110 + *  \sa SDL_HapticOpen
  30.111 + *  \sa SDL_HapticOpenFromJoystick
  30.112 + *  \sa SDL_HapticClose
  30.113 + */
  30.114 +struct _SDL_Haptic;
  30.115 +typedef struct _SDL_Haptic SDL_Haptic;
  30.116 +
  30.117 +
  30.118 +/**
  30.119 + *  \name Haptic features
  30.120 + *  
  30.121 + *  Different haptic features a device can have.
  30.122 + */
  30.123 +/*@{*/
  30.124 +
  30.125 +/**
  30.126 + *  \name Haptic effects
  30.127 + */
  30.128 +/*@{*/
  30.129 +
  30.130 +/**
  30.131 + *  \brief Constant effect supported.
  30.132 + *
  30.133 + *  Constant haptic effect.
  30.134 + *  
  30.135 + *  \sa SDL_HapticCondition
  30.136 + */
  30.137 +#define SDL_HAPTIC_CONSTANT   (1<<0)
  30.138 +
  30.139 +/**
  30.140 + *  \brief Sine wave effect supported.
  30.141 + *  
  30.142 + *  Periodic haptic effect that simulates sine waves.
  30.143 + *  
  30.144 + *  \sa SDL_HapticPeriodic
  30.145 + */
  30.146 +#define SDL_HAPTIC_SINE       (1<<1)
  30.147 +
  30.148 +/**
  30.149 + *  \brief Square wave effect supported.
  30.150 + *  
  30.151 + *  Periodic haptic effect that simulates square waves.
  30.152 + * 
  30.153 + *  \sa SDL_HapticPeriodic
  30.154 + */
  30.155 +#define SDL_HAPTIC_SQUARE     (1<<2)
  30.156 +
  30.157 +/**
  30.158 + *  \brief Triangle wave effect supported.
  30.159 + *  
  30.160 + *  Periodic haptic effect that simulates triangular waves.
  30.161 + *  
  30.162 + *  \sa SDL_HapticPeriodic
  30.163 + */
  30.164 +#define SDL_HAPTIC_TRIANGLE   (1<<3)
  30.165 +
  30.166 +/**
  30.167 + *  \brief Sawtoothup wave effect supported.
  30.168 + *  
  30.169 + *  Periodic haptic effect that simulates saw tooth up waves.
  30.170 + *  
  30.171 + *  \sa SDL_HapticPeriodic
  30.172 + */
  30.173 +#define SDL_HAPTIC_SAWTOOTHUP (1<<4)
  30.174 +
  30.175 +/**
  30.176 + *  \brief Sawtoothdown wave effect supported.
  30.177 + *  
  30.178 + *  Periodic haptic effect that simulates saw tooth down waves.
  30.179 + *  
  30.180 + *  \sa SDL_HapticPeriodic
  30.181 + */
  30.182 +#define SDL_HAPTIC_SAWTOOTHDOWN (1<<5)
  30.183 +
  30.184 +/**
  30.185 + *  \brief Ramp effect supported.
  30.186 + *  
  30.187 + *  Ramp haptic effect.
  30.188 + *  
  30.189 + *  \sa SDL_HapticRamp
  30.190 + */
  30.191 +#define SDL_HAPTIC_RAMP       (1<<6)
  30.192 +
  30.193 +/**
  30.194 + *  \brief Spring effect supported - uses axes position.
  30.195 + *  
  30.196 + *  Condition haptic effect that simulates a spring.  Effect is based on the
  30.197 + *  axes position.
  30.198 + *
  30.199 + *  \sa SDL_HapticCondition
  30.200 + */
  30.201 +#define SDL_HAPTIC_SPRING     (1<<7)
  30.202 +
  30.203 +/**
  30.204 + *  \brief Damper effect supported - uses axes velocity.
  30.205 + *  
  30.206 + *  Condition haptic effect that simulates dampening.  Effect is based on the
  30.207 + *  axes velocity.
  30.208 + *  
  30.209 + *  \sa SDL_HapticCondition
  30.210 + */
  30.211 +#define SDL_HAPTIC_DAMPER     (1<<8)
  30.212 +
  30.213 +/**
  30.214 + *  \brief Inertia effect supported - uses axes acceleration.
  30.215 + *  
  30.216 + *  Condition haptic effect that simulates inertia.  Effect is based on the axes
  30.217 + *  acceleration.
  30.218 + *
  30.219 + *  \sa SDL_HapticCondition
  30.220 + */
  30.221 +#define SDL_HAPTIC_INERTIA    (1<<9)
  30.222 +
  30.223 +/**
  30.224 + *  \brief Friction effect supported - uses axes movement.
  30.225 + *  
  30.226 + *  Condition haptic effect that simulates friction.  Effect is based on the 
  30.227 + *  axes movement.
  30.228 + *  
  30.229 + *  \sa SDL_HapticCondition
  30.230 + */
  30.231 +#define SDL_HAPTIC_FRICTION   (1<<10)
  30.232 +
  30.233 +/**
  30.234 + *  \brief Custom effect is supported.
  30.235 + *  
  30.236 + *  User defined custom haptic effect.
  30.237 + */
  30.238 +#define SDL_HAPTIC_CUSTOM     (1<<11)
  30.239 +
  30.240 +/*@}*//*Haptic effects*/
  30.241 +
  30.242 +/* These last few are features the device has, not effects */
  30.243 +
  30.244 +/**
  30.245 + *  \brief Device can set global gain.
  30.246 + *  
  30.247 + *  Device supports setting the global gain.
  30.248 + *  
  30.249 + *  \sa SDL_HapticSetGain
  30.250 + */
  30.251 +#define SDL_HAPTIC_GAIN       (1<<12)
  30.252 +
  30.253 +/**
  30.254 + *  \brief Device can set autocenter.
  30.255 + *  
  30.256 + *  Device supports setting autocenter.
  30.257 + *  
  30.258 + *  \sa SDL_HapticSetAutocenter
  30.259 + */
  30.260 +#define SDL_HAPTIC_AUTOCENTER (1<<13)
  30.261 +
  30.262 +/**
  30.263 + *  \brief Device can be queried for effect status.
  30.264 + *  
  30.265 + *  Device can be queried for effect status.
  30.266 + *  
  30.267 + *  \sa SDL_HapticGetEffectStatus
  30.268 + */
  30.269 +#define SDL_HAPTIC_STATUS     (1<<14)
  30.270 +
  30.271 +/**
  30.272 + *  \brief Device can be paused.
  30.273 + *  
  30.274 + *  \sa SDL_HapticPause
  30.275 + *  \sa SDL_HapticUnpause
  30.276 + */
  30.277 +#define SDL_HAPTIC_PAUSE      (1<<15)
  30.278 +
  30.279 +
  30.280 +/**
  30.281 + * \name Direction encodings
  30.282 + */
  30.283 +/*@{*/
  30.284 +
  30.285 +/**
  30.286 + *  \brief Uses polar coordinates for the direction.
  30.287 + *  
  30.288 + *  \sa SDL_HapticDirection
  30.289 + */
  30.290 +#define SDL_HAPTIC_POLAR      0
  30.291 +
  30.292 +/**
  30.293 + *  \brief Uses cartesian coordinates for the direction.
  30.294 + *  
  30.295 + *  \sa SDL_HapticDirection
  30.296 + */
  30.297 +#define SDL_HAPTIC_CARTESIAN  1
  30.298 +
  30.299 +/**
  30.300 + *  \brief Uses spherical coordinates for the direction.
  30.301 + *  
  30.302 + *  \sa SDL_HapticDirection
  30.303 + */
  30.304 +#define SDL_HAPTIC_SPHERICAL  2
  30.305 +
  30.306 +/*@}*//*Direction encodings*/
  30.307 +
  30.308 +/*@}*//*Haptic features*/
  30.309 +
  30.310 +/*
  30.311 + * Misc defines.
  30.312 + */
  30.313 +
  30.314 +/**
  30.315 + * \brief Used to play a device an infinite number of times.
  30.316 + *
  30.317 + * \sa SDL_HapticRunEffect
  30.318 + */
  30.319 +#define SDL_HAPTIC_INFINITY   4294967295U
  30.320 +
  30.321 +
  30.322 +/**
  30.323 + *  \brief Structure that represents a haptic direction.
  30.324 + *  
  30.325 + *  Directions can be specified by:
  30.326 + *   - ::SDL_HAPTIC_POLAR : Specified by polar coordinates.
  30.327 + *   - ::SDL_HAPTIC_CARTESIAN : Specified by cartesian coordinates.
  30.328 + *   - ::SDL_HAPTIC_SPHERICAL : Specified by spherical coordinates.
  30.329 + *
  30.330 + *  Cardinal directions of the haptic device are relative to the positioning
  30.331 + *  of the device.  North is considered to be away from the user.
  30.332 + *
  30.333 + *  The following diagram represents the cardinal directions:
  30.334 + *  \verbatim
  30.335 +                 .--.
  30.336 +                 |__| .-------.
  30.337 +                 |=.| |.-----.|
  30.338 +                 |--| ||     ||
  30.339 +                 |  | |'-----'|
  30.340 +                 |__|~')_____('
  30.341 +                   [ COMPUTER ]
  30.342 +    
  30.343 +    
  30.344 +                     North (0,-1)
  30.345 +                         ^
  30.346 +                         |
  30.347 +                         |
  30.348 +    (1,0)  West <----[ HAPTIC ]----> East (-1,0)
  30.349 +                         |
  30.350 +                         |
  30.351 +                         v
  30.352 +                      South (0,1)
  30.353 +    
  30.354 +    
  30.355 +                      [ USER ]
  30.356 +                        \|||/
  30.357 +                        (o o)
  30.358 +                  ---ooO-(_)-Ooo---
  30.359 +    \endverbatim
  30.360 + *  
  30.361 + *  If type is ::SDL_HAPTIC_POLAR, direction is encoded by hundredths of a 
  30.362 + *  degree starting north and turning clockwise.  ::SDL_HAPTIC_POLAR only uses
  30.363 + *  the first \c dir parameter.  The cardinal directions would be:
  30.364 + *   - North: 0 (0 degrees)
  30.365 + *   - East: 9000 (90 degrees)
  30.366 + *   - South: 18000 (180 degrees)
  30.367 + *   - West: 27000 (270 degrees)
  30.368 + *  
  30.369 + *  If type is ::SDL_HAPTIC_CARTESIAN, direction is encoded by three positions
  30.370 + *  (X axis, Y axis and Z axis (with 3 axes)).  ::SDL_HAPTIC_CARTESIAN uses
  30.371 + *  the first three \c dir parameters.  The cardinal directions would be:
  30.372 + *   - North:  0,-1, 0
  30.373 + *   - East:  -1, 0, 0
  30.374 + *   - South:  0, 1, 0
  30.375 + *   - West:   1, 0, 0
  30.376 + *  
  30.377 + *  The Z axis represents the height of the effect if supported, otherwise
  30.378 + *  it's unused.  In cartesian encoding (1, 2) would be the same as (2, 4), you
  30.379 + *  can use any multiple you want, only the direction matters.
  30.380 + *  
  30.381 + *  If type is ::SDL_HAPTIC_SPHERICAL, direction is encoded by two rotations.
  30.382 + *  The first two \c dir parameters are used.  The \c dir parameters are as 
  30.383 + *  follows (all values are in hundredths of degrees):
  30.384 + *   - Degrees from (1, 0) rotated towards (0, 1).
  30.385 + *   - Degrees towards (0, 0, 1) (device needs at least 3 axes).
  30.386 + *
  30.387 + *
  30.388 + *  Example of force coming from the south with all encodings (force coming
  30.389 + *  from the south means the user will have to pull the stick to counteract):
  30.390 + *  \code
  30.391 + *  SDL_HapticDirection direction;
  30.392 + *  
  30.393 + *  // Cartesian directions
  30.394 + *  direction.type = SDL_HAPTIC_CARTESIAN; // Using cartesian direction encoding.
  30.395 + *  direction.dir[0] = 0; // X position
  30.396 + *  direction.dir[1] = 1; // Y position
  30.397 + *  // Assuming the device has 2 axes, we don't need to specify third parameter.
  30.398 + *  
  30.399 + *  // Polar directions
  30.400 + *  direction.type = SDL_HAPTIC_POLAR; // We'll be using polar direction encoding.
  30.401 + *  direction.dir[0] = 18000; // Polar only uses first parameter
  30.402 + *  
  30.403 + *  // Spherical coordinates
  30.404 + *  direction.type = SDL_HAPTIC_SPHERICAL; // Spherical encoding
  30.405 + *  direction.dir[0] = 9000; // Since we only have two axes we don't need more parameters.
  30.406 + *  \endcode
  30.407 + *
  30.408 + *  \sa SDL_HAPTIC_POLAR
  30.409 + *  \sa SDL_HAPTIC_CARTESIAN
  30.410 + *  \sa SDL_HAPTIC_SPHERICAL
  30.411 + *  \sa SDL_HapticEffect
  30.412 + *  \sa SDL_HapticNumAxes
  30.413 + */
  30.414 +typedef struct SDL_HapticDirection
  30.415 +{
  30.416 +    Uint8 type;         /**< The type of encoding. */
  30.417 +    Sint32 dir[3];      /**< The encoded direction. */
  30.418 +} SDL_HapticDirection;
  30.419 +
  30.420 +
  30.421 +/**
  30.422 + *  \brief A structure containing a template for a Constant effect.
  30.423 + *  
  30.424 + *  The struct is exclusive to the ::SDL_HAPTIC_CONSTANT effect.
  30.425 + *  
  30.426 + *  A constant effect applies a constant force in the specified direction
  30.427 + *  to the joystick.
  30.428 + *  
  30.429 + *  \sa SDL_HAPTIC_CONSTANT
  30.430 + *  \sa SDL_HapticEffect
  30.431 + */
  30.432 +typedef struct SDL_HapticConstant
  30.433 +{
  30.434 +    /* Header */
  30.435 +    Uint16 type;            /**< ::SDL_HAPTIC_CONSTANT */
  30.436 +    SDL_HapticDirection direction;  /**< Direction of the effect. */
  30.437 +
  30.438 +    /* Replay */
  30.439 +    Uint32 length;          /**< Duration of the effect. */
  30.440 +    Uint16 delay;           /**< Delay before starting the effect. */
  30.441 +
  30.442 +    /* Trigger */
  30.443 +    Uint16 button;          /**< Button that triggers the effect. */
  30.444 +    Uint16 interval;        /**< How soon it can be triggered again after button. */
  30.445 +
  30.446 +    /* Constant */
  30.447 +    Sint16 level;           /**< Strength of the constant effect. */
  30.448 +
  30.449 +    /* Envelope */
  30.450 +    Uint16 attack_length;   /**< Duration of the attack. */
  30.451 +    Uint16 attack_level;    /**< Level at the start of the attack. */
  30.452 +    Uint16 fade_length;     /**< Duration of the fade. */
  30.453 +    Uint16 fade_level;      /**< Level at the end of the fade. */
  30.454 +} SDL_HapticConstant;
  30.455 +
  30.456 +/**
  30.457 + *  \brief A structure containing a template for a Periodic effect.
  30.458 + *  
  30.459 + *  The struct handles the following effects:
  30.460 + *   - ::SDL_HAPTIC_SINE
  30.461 + *   - ::SDL_HAPTIC_SQUARE
  30.462 + *   - ::SDL_HAPTIC_TRIANGLE
  30.463 + *   - ::SDL_HAPTIC_SAWTOOTHUP
  30.464 + *   - ::SDL_HAPTIC_SAWTOOTHDOWN
  30.465 + *  
  30.466 + *  A periodic effect consists in a wave-shaped effect that repeats itself
  30.467 + *  over time.  The type determines the shape of the wave and the parameters
  30.468 + *  determine the dimensions of the wave.
  30.469 + *  
  30.470 + *  Phase is given by hundredth of a cyle meaning that giving the phase a value
  30.471 + *  of 9000 will displace it 25% of it's period.  Here are sample values:
  30.472 + *   -     0: No phase displacement.
  30.473 + *   -  9000: Displaced 25% of it's period.
  30.474 + *   - 18000: Displaced 50% of it's period.
  30.475 + *   - 27000: Displaced 75% of it's period.
  30.476 + *   - 36000: Displaced 100% of it's period, same as 0, but 0 is preffered.
  30.477 + *
  30.478 + *  Examples:
  30.479 + *  \verbatim
  30.480 +    SDL_HAPTIC_SINE
  30.481 +      __      __      __      __
  30.482 +     /  \    /  \    /  \    /
  30.483 +    /    \__/    \__/    \__/
  30.484 +    
  30.485 +    SDL_HAPTIC_SQUARE
  30.486 +     __    __    __    __    __
  30.487 +    |  |  |  |  |  |  |  |  |  |
  30.488 +    |  |__|  |__|  |__|  |__|  |
  30.489 +    
  30.490 +    SDL_HAPTIC_TRIANGLE
  30.491 +      /\    /\    /\    /\    /\
  30.492 +     /  \  /  \  /  \  /  \  /
  30.493 +    /    \/    \/    \/    \/
  30.494 +    
  30.495 +    SDL_HAPTIC_SAWTOOTHUP
  30.496 +      /|  /|  /|  /|  /|  /|  /|
  30.497 +     / | / | / | / | / | / | / |
  30.498 +    /  |/  |/  |/  |/  |/  |/  |
  30.499 +    
  30.500 +    SDL_HAPTIC_SAWTOOTHDOWN
  30.501 +    \  |\  |\  |\  |\  |\  |\  |
  30.502 +     \ | \ | \ | \ | \ | \ | \ |
  30.503 +      \|  \|  \|  \|  \|  \|  \|
  30.504 +    \endverbatim
  30.505 + *  
  30.506 + *  \sa SDL_HAPTIC_SINE
  30.507 + *  \sa SDL_HAPTIC_SQUARE
  30.508 + *  \sa SDL_HAPTIC_TRIANGLE
  30.509 + *  \sa SDL_HAPTIC_SAWTOOTHUP
  30.510 + *  \sa SDL_HAPTIC_SAWTOOTHDOWN
  30.511 + *  \sa SDL_HapticEffect
  30.512 + */
  30.513 +typedef struct SDL_HapticPeriodic
  30.514 +{
  30.515 +    /* Header */
  30.516 +    Uint16 type;        /**< ::SDL_HAPTIC_SINE, ::SDL_HAPTIC_SQUARE,
  30.517 +                             ::SDL_HAPTIC_TRIANGLE, ::SDL_HAPTIC_SAWTOOTHUP or
  30.518 +                             ::SDL_HAPTIC_SAWTOOTHDOWN */
  30.519 +    SDL_HapticDirection direction;  /**< Direction of the effect. */
  30.520 +
  30.521 +    /* Replay */
  30.522 +    Uint32 length;      /**< Duration of the effect. */
  30.523 +    Uint16 delay;       /**< Delay before starting the effect. */
  30.524 +
  30.525 +    /* Trigger */
  30.526 +    Uint16 button;      /**< Button that triggers the effect. */
  30.527 +    Uint16 interval;    /**< How soon it can be triggered again after button. */
  30.528 +
  30.529 +    /* Periodic */
  30.530 +    Uint16 period;      /**< Period of the wave. */
  30.531 +    Sint16 magnitude;   /**< Peak value. */
  30.532 +    Sint16 offset;      /**< Mean value of the wave. */
  30.533 +    Uint16 phase;       /**< Horizontal shift given by hundredth of a cycle. */
  30.534 +
  30.535 +    /* Envelope */
  30.536 +    Uint16 attack_length;   /**< Duration of the attack. */
  30.537 +    Uint16 attack_level;    /**< Level at the start of the attack. */
  30.538 +    Uint16 fade_length; /**< Duration of the fade. */
  30.539 +    Uint16 fade_level;  /**< Level at the end of the fade. */
  30.540 +} SDL_HapticPeriodic;
  30.541 +
  30.542 +/**
  30.543 + *  \brief A structure containing a template for a Condition effect.
  30.544 + *  
  30.545 + *  The struct handles the following effects:
  30.546 + *   - ::SDL_HAPTIC_SPRING: Effect based on axes position.
  30.547 + *   - ::SDL_HAPTIC_DAMPER: Effect based on axes velocity.
  30.548 + *   - ::SDL_HAPTIC_INERTIA: Effect based on axes acceleration.
  30.549 + *   - ::SDL_HAPTIC_FRICTION: Effect based on axes movement.
  30.550 + *  
  30.551 + *  Direction is handled by condition internals instead of a direction member.
  30.552 + *  The condition effect specific members have three parameters.  The first
  30.553 + *  refers to the X axis, the second refers to the Y axis and the third
  30.554 + *  refers to the Z axis.  The right terms refer to the positive side of the
  30.555 + *  axis and the left terms refer to the negative side of the axis.  Please 
  30.556 + *  refer to the ::SDL_HapticDirection diagram for which side is positive and
  30.557 + *  which is negative.
  30.558 + *  
  30.559 + *  \sa SDL_HapticDirection
  30.560 + *  \sa SDL_HAPTIC_SPRING
  30.561 + *  \sa SDL_HAPTIC_DAMPER
  30.562 + *  \sa SDL_HAPTIC_INERTIA
  30.563 + *  \sa SDL_HAPTIC_FRICTION
  30.564 + *  \sa SDL_HapticEffect
  30.565 + */
  30.566 +typedef struct SDL_HapticCondition
  30.567 +{
  30.568 +    /* Header */
  30.569 +    Uint16 type;            /**< ::SDL_HAPTIC_SPRING, ::SDL_HAPTIC_DAMPER,
  30.570 +                                 ::SDL_HAPTIC_INERTIA or ::SDL_HAPTIC_FRICTION */
  30.571 +    SDL_HapticDirection direction;  /**< Direction of the effect - Not used ATM. */
  30.572 +
  30.573 +    /* Replay */
  30.574 +    Uint32 length;          /**< Duration of the effect. */
  30.575 +    Uint16 delay;           /**< Delay before starting the effect. */
  30.576 +
  30.577 +    /* Trigger */
  30.578 +    Uint16 button;          /**< Button that triggers the effect. */
  30.579 +    Uint16 interval;        /**< How soon it can be triggered again after button. */
  30.580 +
  30.581 +    /* Condition */
  30.582 +    Uint16 right_sat[3];    /**< Level when joystick is to the positive side. */
  30.583 +    Uint16 left_sat[3];     /**< Level when joystick is to the negative side. */
  30.584 +    Sint16 right_coeff[3];  /**< How fast to increase the force towards the positive side. */
  30.585 +    Sint16 left_coeff[3];   /**< How fast to increase the force towards the negative side. */
  30.586 +    Uint16 deadband[3];     /**< Size of the dead zone. */
  30.587 +    Sint16 center[3];       /**< Position of the dead zone. */
  30.588 +} SDL_HapticCondition;
  30.589 +
  30.590 +/**
  30.591 + *  \brief A structure containing a template for a Ramp effect.
  30.592 + *  
  30.593 + *  This struct is exclusively for the ::SDL_HAPTIC_RAMP effect.
  30.594 + *  
  30.595 + *  The ramp effect starts at start strength and ends at end strength.
  30.596 + *  It augments in linear fashion.  If you use attack and fade with a ramp
  30.597 + *  they effects get added to the ramp effect making the effect become
  30.598 + *  quadratic instead of linear.
  30.599 + *  
  30.600 + *  \sa SDL_HAPTIC_RAMP
  30.601 + *  \sa SDL_HapticEffect
  30.602 + */
  30.603 +typedef struct SDL_HapticRamp
  30.604 +{
  30.605 +    /* Header */
  30.606 +    Uint16 type;            /**< ::SDL_HAPTIC_RAMP */
  30.607 +    SDL_HapticDirection direction;  /**< Direction of the effect. */
  30.608 +
  30.609 +    /* Replay */
  30.610 +    Uint32 length;          /**< Duration of the effect. */
  30.611 +    Uint16 delay;           /**< Delay before starting the effect. */
  30.612 +
  30.613 +    /* Trigger */
  30.614 +    Uint16 button;          /**< Button that triggers the effect. */
  30.615 +    Uint16 interval;        /**< How soon it can be triggered again after button. */
  30.616 +
  30.617 +    /* Ramp */
  30.618 +    Sint16 start;           /**< Beginning strength level. */
  30.619 +    Sint16 end;             /**< Ending strength level. */
  30.620 +
  30.621 +    /* Envelope */
  30.622 +    Uint16 attack_length;   /**< Duration of the attack. */
  30.623 +    Uint16 attack_level;    /**< Level at the start of the attack. */
  30.624 +    Uint16 fade_length;     /**< Duration of the fade. */
  30.625 +    Uint16 fade_level;      /**< Level at the end of the fade. */
  30.626 +} SDL_HapticRamp;
  30.627 +
  30.628 +/**
  30.629 + *  \brief A structure containing a template for the ::SDL_HAPTIC_CUSTOM effect.
  30.630 + *  
  30.631 + *  A custom force feedback effect is much like a periodic effect, where the
  30.632 + *  application can define it's exact shape.  You will have to allocate the
  30.633 + *  data yourself.  Data should consist of channels * samples Uint16 samples.
  30.634 + *  
  30.635 + *  If channels is one, the effect is rotated using the defined direction.
  30.636 + *  Otherwise it uses the samples in data for the different axes.
  30.637 + *  
  30.638 + *  \sa SDL_HAPTIC_CUSTOM
  30.639 + *  \sa SDL_HapticEffect
  30.640 + */
  30.641 +typedef struct SDL_HapticCustom
  30.642 +{
  30.643 +    /* Header */
  30.644 +    Uint16 type;            /**< ::SDL_HAPTIC_CUSTOM */
  30.645 +    SDL_HapticDirection direction;  /**< Direction of the effect. */
  30.646 +
  30.647 +    /* Replay */
  30.648 +    Uint32 length;          /**< Duration of the effect. */
  30.649 +    Uint16 delay;           /**< Delay before starting the effect. */
  30.650 +
  30.651 +    /* Trigger */
  30.652 +    Uint16 button;          /**< Button that triggers the effect. */
  30.653 +    Uint16 interval;        /**< How soon it can be triggered again after button. */
  30.654 +
  30.655 +    /* Custom */
  30.656 +    Uint8 channels;         /**< Axes to use, minimum of one. */
  30.657 +    Uint16 period;          /**< Sample periods. */
  30.658 +    Uint16 samples;         /**< Amount of samples. */
  30.659 +    Uint16 *data;           /**< Should contain channels*samples items. */
  30.660 +
  30.661 +    /* Envelope */
  30.662 +    Uint16 attack_length;   /**< Duration of the attack. */
  30.663 +    Uint16 attack_level;    /**< Level at the start of the attack. */
  30.664 +    Uint16 fade_length;     /**< Duration of the fade. */
  30.665 +    Uint16 fade_level;      /**< Level at the end of the fade. */
  30.666 +} SDL_HapticCustom;
  30.667 +
  30.668 +/**
  30.669 + *  \brief The generic template for any haptic effect.
  30.670 + *  
  30.671 + *  All values max at 32767 (0x7FFF).  Signed values also can be negative.
  30.672 + *  Time values unless specified otherwise are in milliseconds.
  30.673 + *  
  30.674 + *  You can also pass ::SDL_HAPTIC_INFINITY to length instead of a 0-32767 
  30.675 + *  value.  Neither delay, interval, attack_length nor fade_length support 
  30.676 + *  ::SDL_HAPTIC_INFINITY.  Fade will also not be used since effect never ends.
  30.677 + *  
  30.678 + *  Additionally, the ::SDL_HAPTIC_RAMP effect does not support a duration of
  30.679 + *  ::SDL_HAPTIC_INFINITY.
  30.680 + *  
  30.681 + *  Button triggers may not be supported on all devices, it is advised to not
  30.682 + *  use them if possible.  Buttons start at index 1 instead of index 0 like
  30.683 + *  they joystick.
  30.684 + *  
  30.685 + *  If both attack_length and fade_level are 0, the envelope is not used,
  30.686 + *  otherwise both values are used.
  30.687 + *  
  30.688 + *  Common parts:
  30.689 + *  \code
  30.690 + *  // Replay - All effects have this
  30.691 + *  Uint32 length;        // Duration of effect (ms).
  30.692 + *  Uint16 delay;         // Delay before starting effect.
  30.693 + *  
  30.694 + *  // Trigger - All effects have this
  30.695 + *  Uint16 button;        // Button that triggers effect.
  30.696 + *  Uint16 interval;      // How soon before effect can be triggered again.
  30.697 + *  
  30.698 + *  // Envelope - All effects except condition effects have this
  30.699 + *  Uint16 attack_length; // Duration of the attack (ms).
  30.700 + *  Uint16 attack_level;  // Level at the start of the attack.
  30.701 + *  Uint16 fade_length;   // Duration of the fade out (ms).
  30.702 + *  Uint16 fade_level;    // Level at the end of the fade.
  30.703 + *  \endcode
  30.704 + *
  30.705 + *
  30.706 + *  Here we have an example of a constant effect evolution in time:
  30.707 + *  \verbatim
  30.708 +    Strength
  30.709 +    ^
  30.710 +    |
  30.711 +    |    effect level -->  _________________
  30.712 +    |                     /                 \
  30.713 +    |                    /                   \
  30.714 +    |                   /                     \
  30.715 +    |                  /                       \ 
  30.716 +    | attack_level --> |                        \
  30.717 +    |                  |                        |  <---  fade_level
  30.718 +    |
  30.719 +    +--------------------------------------------------> Time
  30.720 +                       [--]                 [---]
  30.721 +                       attack_length        fade_length
  30.722 +    
  30.723 +    [------------------][-----------------------]
  30.724 +    delay               length
  30.725 +    \endverbatim
  30.726 + *  
  30.727 + *  Note either the attack_level or the fade_level may be above the actual
  30.728 + *  effect level.
  30.729 + *
  30.730 + *  \sa SDL_HapticConstant
  30.731 + *  \sa SDL_HapticPeriodic
  30.732 + *  \sa SDL_HapticCondition
  30.733 + *  \sa SDL_HapticRamp
  30.734 + *  \sa SDL_HapticCustom
  30.735 + */
  30.736 +typedef union SDL_HapticEffect
  30.737 +{
  30.738 +    /* Common for all force feedback effects */
  30.739 +    Uint16 type;                    /**< Effect type. */
  30.740 +    SDL_HapticConstant constant;    /**< Constant effect. */
  30.741 +    SDL_HapticPeriodic periodic;    /**< Periodic effect. */
  30.742 +    SDL_HapticCondition condition;  /**< Condition effect. */
  30.743 +    SDL_HapticRamp ramp;            /**< Ramp effect. */
  30.744 +    SDL_HapticCustom custom;        /**< Custom effect. */
  30.745 +} SDL_HapticEffect;
  30.746 +
  30.747 +
  30.748 +/* Function prototypes */
  30.749 +/**
  30.750 + *  \brief Count the number of joysticks attached to the system.
  30.751 + *  
  30.752 + *  \return Number of haptic devices detected on the system.
  30.753 + */
  30.754 +extern DECLSPEC int SDLCALL SDL_NumHaptics(void);
  30.755 +
  30.756 +/**
  30.757 + *  \brief Get the implementation dependent name of a Haptic device.
  30.758 + *  
  30.759 + *  This can be called before any joysticks are opened.
  30.760 + *  If no name can be found, this function returns NULL.
  30.761 + *  
  30.762 + *  \param device_index Index of the device to get it's name.
  30.763 + *  \return Name of the device or NULL on error.
  30.764 + *
  30.765 + *  \sa SDL_NumHaptics
  30.766 + */
  30.767 +extern DECLSPEC const char *SDLCALL SDL_HapticName(int device_index);
  30.768 +
  30.769 +/**
  30.770 + *  \brief Opens a Haptic device for usage.
  30.771 + *  
  30.772 + *  The index passed as an argument refers to the N'th Haptic device on this 
  30.773 + *  system.
  30.774 + *
  30.775 + *  When opening a haptic device, it's gain will be set to maximum and
  30.776 + *  autocenter will be disabled.  To modify these values use
  30.777 + *  SDL_HapticSetGain() and SDL_HapticSetAutocenter().
  30.778 + *
  30.779 + *  \param device_index Index of the device to open.
  30.780 + *  \return Device identifier or NULL on error.
  30.781 + *
  30.782 + *  \sa SDL_HapticIndex
  30.783 + *  \sa SDL_HapticOpenFromMouse
  30.784 + *  \sa SDL_HapticOpenFromJoystick
  30.785 + *  \sa SDL_HapticClose
  30.786 + *  \sa SDL_HapticSetGain
  30.787 + *  \sa SDL_HapticSetAutocenter
  30.788 + *  \sa SDL_HapticPause
  30.789 + *  \sa SDL_HapticStopAll
  30.790 + */
  30.791 +extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpen(int device_index);
  30.792 +
  30.793 +/**
  30.794 + *  \brief Checks if the haptic device at index has been opened.
  30.795 + *  
  30.796 + *  \param device_index Index to check to see if it has been opened.
  30.797 + *  \return 1 if it has been opened or 0 if it hasn't.
  30.798 + *  
  30.799 + *  \sa SDL_HapticOpen
  30.800 + *  \sa SDL_HapticIndex
  30.801 + */
  30.802 +extern DECLSPEC int SDLCALL SDL_HapticOpened(int device_index);
  30.803 +
  30.804 +/**
  30.805 + *  \brief Gets the index of a haptic device.
  30.806 + *  
  30.807 + *  \param haptic Haptic device to get the index of.
  30.808 + *  \return The index of the haptic device or -1 on error.
  30.809 + *  
  30.810 + *  \sa SDL_HapticOpen
  30.811 + *  \sa SDL_HapticOpened
  30.812 + */
  30.813 +extern DECLSPEC int SDLCALL SDL_HapticIndex(SDL_Haptic * haptic);
  30.814 +
  30.815 +/**
  30.816 + *  \brief Gets whether or not the current mouse has haptic capabilities.
  30.817 + *  
  30.818 + *  \return SDL_TRUE if the mouse is haptic, SDL_FALSE if it isn't.
  30.819 + *  
  30.820 + *  \sa SDL_HapticOpenFromMouse
  30.821 + */
  30.822 +extern DECLSPEC int SDLCALL SDL_MouseIsHaptic(void);
  30.823 +
  30.824 +/**
  30.825 + *  \brief Tries to open a haptic device from the current mouse.
  30.826 + *  
  30.827 + *  \return The haptic device identifier or NULL on error.
  30.828 + *  
  30.829 + *  \sa SDL_MouseIsHaptic
  30.830 + *  \sa SDL_HapticOpen
  30.831 + */
  30.832 +extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromMouse(void);
  30.833 +
  30.834 +/**
  30.835 + *  \brief Checks to see if a joystick has haptic features.
  30.836 + *  
  30.837 + *  \param joystick Joystick to test for haptic capabilities.
  30.838 + *  \return 1 if the joystick is haptic, 0 if it isn't
  30.839 + *          or -1 if an error ocurred.
  30.840 + *  
  30.841 + *  \sa SDL_HapticOpenFromJoystick
  30.842 + */
  30.843 +extern DECLSPEC int SDLCALL SDL_JoystickIsHaptic(SDL_Joystick * joystick);
  30.844 +
  30.845 +/**
  30.846 + *  \brief Opens a Haptic device for usage from a Joystick device.
  30.847 + *  
  30.848 + *  You must still close the haptic device seperately.  It will not be closed 
  30.849 + *  with the joystick.
  30.850 + *  
  30.851 + *  When opening from a joystick you should first close the haptic device before
  30.852 + *  closing the joystick device.  If not, on some implementations the haptic
  30.853 + *  device will also get unallocated and you'll be unable to use force feedback
  30.854 + *  on that device.
  30.855 + *  
  30.856 + *  \param joystick Joystick to create a haptic device from.
  30.857 + *  \return A valid haptic device identifier on success or NULL on error.
  30.858 + *  
  30.859 + *  \sa SDL_HapticOpen
  30.860 + *  \sa SDL_HapticClose
  30.861 + */
  30.862 +extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromJoystick(SDL_Joystick *
  30.863 +                                                               joystick);
  30.864 +
  30.865 +/**
  30.866 + *  \brief Closes a Haptic device previously opened with SDL_HapticOpen().
  30.867 + *  
  30.868 + *  \param haptic Haptic device to close.
  30.869 + */
  30.870 +extern DECLSPEC void SDLCALL SDL_HapticClose(SDL_Haptic * haptic);
  30.871 +
  30.872 +/**
  30.873 + *  \brief Returns the number of effects a haptic device can store.
  30.874 + *  
  30.875 + *  On some platforms this isn't fully supported, and therefore is an
  30.876 + *  aproximation.  Always check to see if your created effect was actually
  30.877 + *  created and do not rely solely on SDL_HapticNumEffects().
  30.878 + *  
  30.879 + *  \param haptic The haptic device to query effect max.
  30.880 + *  \return The number of effects the haptic device can store or
  30.881 + *          -1 on error.
  30.882 + *  
  30.883 + *  \sa SDL_HapticNumEffectsPlaying
  30.884 + *  \sa SDL_HapticQuery
  30.885 + */
  30.886 +extern DECLSPEC int SDLCALL SDL_HapticNumEffects(SDL_Haptic * haptic);
  30.887 +
  30.888 +/**
  30.889 + *  \brief Returns the number of effects a haptic device can play at the same 
  30.890 + *         time.
  30.891 + *  
  30.892 + *  This is not supported on all platforms, but will always return a value.  
  30.893 + *  Added here for the sake of completness.
  30.894 + *  
  30.895 + *  \param haptic The haptic device to query maximum playing effects.
  30.896 + *  \return The number of effects the haptic device can play at the same time
  30.897 + *          or -1 on error.
  30.898 + *
  30.899 + *  \sa SDL_HapticNumEffects
  30.900 + *  \sa SDL_HapticQuery
  30.901 + */
  30.902 +extern DECLSPEC int SDLCALL SDL_HapticNumEffectsPlaying(SDL_Haptic * haptic);
  30.903 +
  30.904 +/**
  30.905 + *  \brief Gets the haptic devices supported features in bitwise matter.
  30.906 + *  
  30.907 + *  Example: 
  30.908 + *  \code
  30.909 + *  if (SDL_HapticQueryEffects(haptic) & SDL_HAPTIC_CONSTANT) {
  30.910 + *      printf("We have constant haptic effect!");
  30.911 + *  }
  30.912 + *  \endcode
  30.913 + *  
  30.914 + *  \param haptic The haptic device to query.
  30.915 + *  \return Haptic features in bitwise manner (OR'd).
  30.916 + *  
  30.917 + *  \sa SDL_HapticNumEffects
  30.918 + *  \sa SDL_HapticEffectSupported
  30.919 + */
  30.920 +extern DECLSPEC unsigned int SDLCALL SDL_HapticQuery(SDL_Haptic * haptic);
  30.921 +
  30.922 +
  30.923 +/**
  30.924 + *  \brief Gets the number of haptic axes the device has.
  30.925 + *  
  30.926 + *  \sa SDL_HapticDirection
  30.927 + */
  30.928 +extern DECLSPEC int SDLCALL SDL_HapticNumAxes(SDL_Haptic * haptic);
  30.929 +
  30.930 +/**
  30.931 + *  \brief Checks to see if effect is supported by haptic.
  30.932 + *  
  30.933 + *  \param haptic Haptic device to check on.
  30.934 + *  \param effect Effect to check to see if it is supported.
  30.935 + *  \return 1 if effect is supported, 0 if it isn't or -1 on error.
  30.936 + *  
  30.937 + *  \sa SDL_HapticQuery
  30.938 + *  \sa SDL_HapticNewEffect
  30.939 + */
  30.940 +extern DECLSPEC int SDLCALL SDL_HapticEffectSupported(SDL_Haptic * haptic,
  30.941 +                                                      SDL_HapticEffect *
  30.942 +                                                      effect);
  30.943 +
  30.944 +/**
  30.945 + *  \brief Creates a new haptic effect on the device.
  30.946 + *  
  30.947 + *  \param haptic Haptic device to create the effect on.
  30.948 + *  \param effect Properties of the effect to create.
  30.949 + *  \return The id of the effect on success or -1 on error.
  30.950 + *  
  30.951 + *  \sa SDL_HapticUpdateEffect
  30.952 + *  \sa SDL_HapticRunEffect
  30.953 + *  \sa SDL_HapticDestroyEffect
  30.954 + */
  30.955 +extern DECLSPEC int SDLCALL SDL_HapticNewEffect(SDL_Haptic * haptic,
  30.956 +                                                SDL_HapticEffect * effect);
  30.957 +
  30.958 +/**
  30.959 + *  \brief Updates the properties of an effect.
  30.960 + *  
  30.961 + *  Can be used dynamically, although behaviour when dynamically changing
  30.962 + *  direction may be strange.  Specifically the effect may reupload itself
  30.963 + *  and start playing from the start.  You cannot change the type either when
  30.964 + *  running SDL_HapticUpdateEffect().
  30.965 + *  
  30.966 + *  \param haptic Haptic device that has the effect.
  30.967 + *  \param effect Effect to update.
  30.968 + *  \param data New effect properties to use.
  30.969 + *  \return The id of the effect on success or -1 on error.
  30.970 + *  
  30.971 + *  \sa SDL_HapticNewEffect
  30.972 + *  \sa SDL_HapticRunEffect
  30.973 + *  \sa SDL_HapticDestroyEffect
  30.974 + */
  30.975 +extern DECLSPEC int SDLCALL SDL_HapticUpdateEffect(SDL_Haptic * haptic,
  30.976 +                                                   int effect,
  30.977 +                                                   SDL_HapticEffect * data);
  30.978 +
  30.979 +/**
  30.980 + *  \brief Runs the haptic effect on it's assosciated haptic device.
  30.981 + *  
  30.982 + *  If iterations are ::SDL_HAPTIC_INFINITY, it'll run the effect over and over
  30.983 + *  repeating the envelope (attack and fade) every time.  If you only want the
  30.984 + *  effect to last forever, set ::SDL_HAPTIC_INFINITY in the effect's length
  30.985 + *  parameter.
  30.986 + *  
  30.987 + *  \param haptic Haptic device to run the effect on.
  30.988 + *  \param effect Identifier of the haptic effect to run.
  30.989 + *  \param iterations Number of iterations to run the effect. Use
  30.990 + *         ::SDL_HAPTIC_INFINITY for infinity.
  30.991 + *  \return 0 on success or -1 on error.
  30.992 + *  
  30.993 + *  \sa SDL_HapticStopEffect
  30.994 + *  \sa SDL_HapticDestroyEffect
  30.995 + *  \sa SDL_HapticGetEffectStatus
  30.996 + */
  30.997 +extern DECLSPEC int SDLCALL SDL_HapticRunEffect(SDL_Haptic * haptic,
  30.998 +                                                int effect,
  30.999 +                                                Uint32 iterations);
 30.1000 +
 30.1001 +/**
 30.1002 + *  \brief Stops the haptic effect on it's assosciated haptic device.
 30.1003 + *  
 30.1004 + *  \param haptic Haptic device to stop the effect on.
 30.1005 + *  \param effect Identifier of the effect to stop.
 30.1006 + *  \return 0 on success or -1 on error.
 30.1007 + *  
 30.1008 + *  \sa SDL_HapticRunEffect
 30.1009 + *  \sa SDL_HapticDestroyEffect
 30.1010 + */
 30.1011 +extern DECLSPEC int SDLCALL SDL_HapticStopEffect(SDL_Haptic * haptic,
 30.1012 +                                                 int effect);
 30.1013 +
 30.1014 +/**
 30.1015 + *  \brief Destroys a haptic effect on the device.
 30.1016 + *  
 30.1017 + *  This will stop the effect if it's running.  Effects are automatically 
 30.1018 + *  destroyed when the device is closed.
 30.1019 + *  
 30.1020 + *  \param haptic Device to destroy the effect on.
 30.1021 + *  \param effect Identifier of the effect to destroy.
 30.1022 + *  
 30.1023 + *  \sa SDL_HapticNewEffect
 30.1024 + */
 30.1025 +extern DECLSPEC void SDLCALL SDL_HapticDestroyEffect(SDL_Haptic * haptic,
 30.1026 +                                                     int effect);
 30.1027 +
 30.1028 +/**
 30.1029 + *  \brief Gets the status of the current effect on the haptic device.
 30.1030 + *  
 30.1031 + *  Device must support the ::SDL_HAPTIC_STATUS feature.
 30.1032 + *  
 30.1033 + *  \param haptic Haptic device to query the effect status on.
 30.1034 + *  \param effect Identifier of the effect to query it's status.
 30.1035 + *  \return 0 if it isn't playing, ::SDL_HAPTIC_PLAYING if it is playing
 30.1036 + *          or -1 on error.
 30.1037 + *  
 30.1038 + *  \sa SDL_HapticRunEffect
 30.1039 + *  \sa SDL_HapticStopEffect
 30.1040 + */
 30.1041 +extern DECLSPEC int SDLCALL SDL_HapticGetEffectStatus(SDL_Haptic * haptic,
 30.1042 +                                                      int effect);
 30.1043 +
 30.1044 +/**
 30.1045 + *  \brief Sets the global gain of the device.
 30.1046 + *  
 30.1047 + *  Device must support the ::SDL_HAPTIC_GAIN feature.
 30.1048 + *  
 30.1049 + *  The user may specify the maxmimum gain by setting the environment variable
 30.1050 + *  ::SDL_HAPTIC_GAIN_MAX which should be between 0 and 100.  All calls to
 30.1051 + *  SDL_HapticSetGain() will scale linearly using ::SDL_HAPTIC_GAIN_MAX as the
 30.1052 + *  maximum.
 30.1053 + *  
 30.1054 + *  \param haptic Haptic device to set the gain on.
 30.1055 + *  \param gain Value to set the gain to, should be between 0 and 100.
 30.1056 + *  \return 0 on success or -1 on error.
 30.1057 + *  
 30.1058 + *  \sa SDL_HapticQuery
 30.1059 + */
 30.1060 +extern DECLSPEC int SDLCALL SDL_HapticSetGain(SDL_Haptic * haptic, int gain);
 30.1061 +
 30.1062 +/**
 30.1063 + *  \brief Sets the global autocenter of the device.
 30.1064 + *  
 30.1065 + *  Autocenter should be between 0 and 100.  Setting it to 0 will disable 
 30.1066 + *  autocentering.
 30.1067 + *
 30.1068 + *  Device must support the ::SDL_HAPTIC_AUTOCENTER feature.
 30.1069 + *
 30.1070 + *  \param haptic Haptic device to set autocentering on.
 30.1071 + *  \param autocenter Value to set autocenter to, 0 disables autocentering.
 30.1072 + *  \return 0 on success or -1 on error.
 30.1073 + *  
 30.1074 + *  \sa SDL_HapticQuery
 30.1075 + */
 30.1076 +extern DECLSPEC int SDLCALL SDL_HapticSetAutocenter(SDL_Haptic * haptic,
 30.1077 +                                                    int autocenter);
 30.1078 +
 30.1079 +/**
 30.1080 + *  \brief Pauses a haptic device.
 30.1081 + *  
 30.1082 + *  Device must support the ::SDL_HAPTIC_PAUSE feature.  Call 
 30.1083 + *  SDL_HapticUnpause() to resume playback.
 30.1084 + *  
 30.1085 + *  Do not modify the effects nor add new ones while the device is paused.
 30.1086 + *  That can cause all sorts of weird errors.
 30.1087 + *  
 30.1088 + *  \param haptic Haptic device to pause.
 30.1089 + *  \return 0 on success or -1 on error.
 30.1090 + *  
 30.1091 + *  \sa SDL_HapticUnpause
 30.1092 + */
 30.1093 +extern DECLSPEC int SDLCALL SDL_HapticPause(SDL_Haptic * haptic);
 30.1094 +
 30.1095 +/**
 30.1096 + *  \brief Unpauses a haptic device.
 30.1097 + *  
 30.1098 + *  Call to unpause after SDL_HapticPause().
 30.1099 + *  
 30.1100 + *  \param haptic Haptic device to pause.
 30.1101 + *  \return 0 on success or -1 on error.
 30.1102 + *  
 30.1103 + *  \sa SDL_HapticPause
 30.1104 + */
 30.1105 +extern DECLSPEC int SDLCALL SDL_HapticUnpause(SDL_Haptic * haptic);
 30.1106 +
 30.1107 +/**
 30.1108 + *  \brief Stops all the currently playing effects on a haptic device.
 30.1109 + *  
 30.1110 + *  \param haptic Haptic device to stop.
 30.1111 + *  \return 0 on success or -1 on error.
 30.1112 + */
 30.1113 +extern DECLSPEC int SDLCALL SDL_HapticStopAll(SDL_Haptic * haptic);
 30.1114 +
 30.1115 +
 30.1116 +/* Ends C function definitions when using C++ */
 30.1117 +#ifdef __cplusplus
 30.1118 +/* *INDENT-OFF* */
 30.1119 +}
 30.1120 +/* *INDENT-ON* */
 30.1121 +#endif
 30.1122 +#include "close_code.h"
 30.1123 +
 30.1124 +#endif /* _SDL_haptic_h */
 30.1125 +
 30.1126 +/* vi: set ts=4 sw=4 expandtab: */
    31.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    31.2 +++ b/touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_input.h	Sat Jul 31 01:24:50 2010 +0400
    31.3 @@ -0,0 +1,88 @@
    31.4 +/*
    31.5 +    SDL - Simple DirectMedia Layer
    31.6 +    Copyright (C) 1997-2010 Sam Lantinga
    31.7 +
    31.8 +    This library is free software; you can redistribute it and/or
    31.9 +    modify it under the terms of the GNU Lesser General Public
   31.10 +    License as published by the Free Software Foundation; either
   31.11 +    version 2.1 of the License, or (at your option) any later version.
   31.12 +
   31.13 +    This library is distributed in the hope that it will be useful,
   31.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   31.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   31.16 +    Lesser General Public License for more details.
   31.17 +
   31.18 +    You should have received a copy of the GNU Lesser General Public
   31.19 +    License along with this library; if not, write to the Free Software
   31.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   31.21 +
   31.22 +    Sam Lantinga
   31.23 +    slouken@libsdl.org
   31.24 +*/
   31.25 +
   31.26 +/**
   31.27 + *  \file SDL_input.h
   31.28 + *  
   31.29 + *  Include file for lowlevel SDL input device handling.
   31.30 + *
   31.31 + *  This talks about individual devices, and not the system cursor. If you
   31.32 + *  just want to know when the user moves the pointer somewhere in your
   31.33 + *  window, this is NOT the API you want. This one handles things like
   31.34 + *  multi-touch, drawing tablets, and multiple, separate mice.
   31.35 + *
   31.36 + *  The other API is in SDL_mouse.h
   31.37 + */
   31.38 +
   31.39 +#ifndef _SDL_input_h
   31.40 +#define _SDL_input_h
   31.41 +
   31.42 +#include "SDL_stdinc.h"
   31.43 +#include "SDL_error.h"
   31.44 +#include "SDL_video.h"
   31.45 +
   31.46 +#include "begin_code.h"
   31.47 +/* Set up for C function definitions, even when using C++ */
   31.48 +#ifdef __cplusplus
   31.49 +/* *INDENT-OFF* */
   31.50 +extern "C" {
   31.51 +/* *INDENT-ON* */
   31.52 +#endif
   31.53 +
   31.54 +
   31.55 +/* Function prototypes */
   31.56 +
   31.57 +/* !!! FIXME: real documentation
   31.58 + * - Redetect devices
   31.59 + * - This invalidates all existing device information from previous queries!
   31.60 + * - There is an implicit (re)detect upon SDL_Init().
   31.61 + */
   31.62 +extern DECLSPEC int SDLCALL SDL_RedetectInputDevices(void);
   31.63 +
   31.64 +/**
   31.65 + *  \brief Get the number of mouse input devices available.
   31.66 + */
   31.67 +extern DECLSPEC int SDLCALL SDL_GetNumInputDevices(void);
   31.68 +
   31.69 +/**
   31.70 + *  \brief Gets the name of a device with the given index.
   31.71 + *  
   31.72 + *  \param index is the index of the device, whose name is to be returned.
   31.73 + *  
   31.74 + *  \return the name of the device with the specified index
   31.75 + */
   31.76 +extern DECLSPEC const char *SDLCALL SDL_GetInputDeviceName(int index);
   31.77 +
   31.78 +
   31.79 +extern DECLSPEC int SDLCALL SDL_IsDeviceDisconnected(int index);
   31.80 +
   31.81 +/* Ends C function definitions when using C++ */
   31.82 +#ifdef __cplusplus
   31.83 +/* *INDENT-OFF* */
   31.84 +}
   31.85 +/* *INDENT-ON* */
   31.86 +#endif
   31.87 +#include "close_code.h"
   31.88 +
   31.89 +#endif /* _SDL_mouse_h */
   31.90 +
   31.91 +/* vi: set ts=4 sw=4 expandtab: */
    32.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    32.2 +++ b/touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_joystick.h	Sat Jul 31 01:24:50 2010 +0400
    32.3 @@ -0,0 +1,209 @@
    32.4 +/*
    32.5 +    SDL - Simple DirectMedia Layer
    32.6 +    Copyright (C) 1997-2010 Sam Lantinga
    32.7 +
    32.8 +    This library is free software; you can redistribute it and/or
    32.9 +    modify it under the terms of the GNU Lesser General Public
   32.10 +    License as published by the Free Software Foundation; either
   32.11 +    version 2.1 of the License, or (at your option) any later version.
   32.12 +
   32.13 +    This library is distributed in the hope that it will be useful,
   32.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   32.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   32.16 +    Lesser General Public License for more details.
   32.17 +
   32.18 +    You should have received a copy of the GNU Lesser General Public
   32.19 +    License along with this library; if not, write to the Free Software
   32.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   32.21 +
   32.22 +    Sam Lantinga
   32.23 +    slouken@libsdl.org
   32.24 +*/
   32.25 +
   32.26 +/**
   32.27 + *  \file SDL_joystick.h
   32.28 + *  
   32.29 + *  Include file for SDL joystick event handling
   32.30 + */
   32.31 +
   32.32 +#ifndef _SDL_joystick_h
   32.33 +#define _SDL_joystick_h
   32.34 +
   32.35 +#include "SDL_stdinc.h"
   32.36 +#include "SDL_error.h"
   32.37 +
   32.38 +#include "begin_code.h"
   32.39 +/* Set up for C function definitions, even when using C++ */
   32.40 +#ifdef __cplusplus
   32.41 +/* *INDENT-OFF* */
   32.42 +extern "C" {
   32.43 +/* *INDENT-ON* */
   32.44 +#endif
   32.45 +
   32.46 +/**
   32.47 + *  \file SDL_joystick.h
   32.48 + *
   32.49 + *  In order to use these functions, SDL_Init() must have been called
   32.50 + *  with the ::SDL_INIT_JOYSTICK flag.  This causes SDL to scan the system
   32.51 + *  for joysticks, and load appropriate drivers.
   32.52 + */
   32.53 +
   32.54 +/* The joystick structure used to identify an SDL joystick */
   32.55 +struct _SDL_Joystick;
   32.56 +typedef struct _SDL_Joystick SDL_Joystick;
   32.57 +
   32.58 +
   32.59 +/* Function prototypes */
   32.60 +/**
   32.61 + *  Count the number of joysticks attached to the system
   32.62 + */
   32.63 +extern DECLSPEC int SDLCALL SDL_NumJoysticks(void);
   32.64 +
   32.65 +/**
   32.66 + *  Get the implementation dependent name of a joystick.
   32.67 + *  This can be called before any joysticks are opened.
   32.68 + *  If no name can be found, this function returns NULL.
   32.69 + */
   32.70 +extern DECLSPEC const char *SDLCALL SDL_JoystickName(int device_index);
   32.71 +
   32.72 +/**
   32.73 + *  Open a joystick for use.  
   32.74 + *  The index passed as an argument refers tothe N'th joystick on the system.  
   32.75 + *  This index is the value which will identify this joystick in future joystick
   32.76 + *  events.
   32.77 + *  
   32.78 + *  \return A joystick identifier, or NULL if an error occurred.
   32.79 + */
   32.80 +extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickOpen(int device_index);
   32.81 +
   32.82 +/**
   32.83 + *  Returns 1 if the joystick has been opened, or 0 if it has not.
   32.84 + */
   32.85 +extern DECLSPEC int SDLCALL SDL_JoystickOpened(int device_index);
   32.86 +
   32.87 +/**
   32.88 + *  Get the device index of an opened joystick.
   32.89 + */
   32.90 +extern DECLSPEC int SDLCALL SDL_JoystickIndex(SDL_Joystick * joystick);
   32.91 +
   32.92 +/**
   32.93 + *  Get the number of general axis controls on a joystick.
   32.94 + */
   32.95 +extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick * joystick);
   32.96 +
   32.97 +/**
   32.98 + *  Get the number of trackballs on a joystick.
   32.99 + *  
  32.100 + *  Joystick trackballs have only relative motion events associated
  32.101 + *  with them and their state cannot be polled.
  32.102 + */
  32.103 +extern DECLSPEC int SDLCALL SDL_JoystickNumBalls(SDL_Joystick * joystick);
  32.104 +
  32.105 +/**
  32.106 + *  Get the number of POV hats on a joystick.
  32.107 + */
  32.108 +extern DECLSPEC int SDLCALL SDL_JoystickNumHats(SDL_Joystick * joystick);
  32.109 +
  32.110 +/**
  32.111 + *  Get the number of buttons on a joystick.
  32.112 + */
  32.113 +extern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick * joystick);
  32.114 +
  32.115 +/**
  32.116 + *  Update the current state of the open joysticks.
  32.117 + *  
  32.118 + *  This is called automatically by the event loop if any joystick
  32.119 + *  events are enabled.
  32.120 + */
  32.121 +extern DECLSPEC void SDLCALL SDL_JoystickUpdate(void);
  32.122 +
  32.123 +/**
  32.124 + *  Enable/disable joystick event polling.
  32.125 + *  
  32.126 + *  If joystick events are disabled, you must call SDL_JoystickUpdate()
  32.127 + *  yourself and check the state of the joystick when you want joystick
  32.128 + *  information.
  32.129 + *  
  32.130 + *  The state can be one of ::SDL_QUERY, ::SDL_ENABLE or ::SDL_IGNORE.
  32.131 + */
  32.132 +extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state);
  32.133 +
  32.134 +/**
  32.135 + *  Get the current state of an axis control on a joystick.
  32.136 + *  
  32.137 + *  The state is a value ranging from -32768 to 32767.
  32.138 + *  
  32.139 + *  The axis indices start at index 0.
  32.140 + */
  32.141 +extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick * joystick,
  32.142 +                                                   int axis);
  32.143 +
  32.144 +/**
  32.145 + *  \name Hat positions
  32.146 + */
  32.147 +/*@{*/
  32.148 +#define SDL_HAT_CENTERED	0x00
  32.149 +#define SDL_HAT_UP		0x01
  32.150 +#define SDL_HAT_RIGHT		0x02
  32.151 +#define SDL_HAT_DOWN		0x04
  32.152 +#define SDL_HAT_LEFT		0x08
  32.153 +#define SDL_HAT_RIGHTUP		(SDL_HAT_RIGHT|SDL_HAT_UP)
  32.154 +#define SDL_HAT_RIGHTDOWN	(SDL_HAT_RIGHT|SDL_HAT_DOWN)
  32.155 +#define SDL_HAT_LEFTUP		(SDL_HAT_LEFT|SDL_HAT_UP)
  32.156 +#define SDL_HAT_LEFTDOWN	(SDL_HAT_LEFT|SDL_HAT_DOWN)
  32.157 +/*@}*/
  32.158 +
  32.159 +/**
  32.160 + *  Get the current state of a POV hat on a joystick.
  32.161 + *
  32.162 + *  The hat indices start at index 0.
  32.163 + *  
  32.164 + *  \return The return value is one of the following positions:
  32.165 + *           - ::SDL_HAT_CENTERED
  32.166 + *           - ::SDL_HAT_UP
  32.167 + *           - ::SDL_HAT_RIGHT
  32.168 + *           - ::SDL_HAT_DOWN
  32.169 + *           - ::SDL_HAT_LEFT
  32.170 + *           - ::SDL_HAT_RIGHTUP
  32.171 + *           - ::SDL_HAT_RIGHTDOWN
  32.172 + *           - ::SDL_HAT_LEFTUP
  32.173 + *           - ::SDL_HAT_LEFTDOWN
  32.174 + */
  32.175 +extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick * joystick,
  32.176 +                                                 int hat);
  32.177 +
  32.178 +/**
  32.179 + *  Get the ball axis change since the last poll.
  32.180 + *  
  32.181 + *  \return 0, or -1 if you passed it invalid parameters.
  32.182 + *  
  32.183 + *  The ball indices start at index 0.
  32.184 + */
  32.185 +extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick * joystick,
  32.186 +                                                int ball, int *dx, int *dy);
  32.187 +
  32.188 +/**
  32.189 + *  Get the current state of a button on a joystick.
  32.190 + *  
  32.191 + *  The button indices start at index 0.
  32.192 + */
  32.193 +extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick,
  32.194 +                                                    int button);
  32.195 +
  32.196 +/**
  32.197 + *  Close a joystick previously opened with SDL_JoystickOpen().
  32.198 + */
  32.199 +extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick * joystick);
  32.200 +
  32.201 +
  32.202 +/* Ends C function definitions when using C++ */
  32.203 +#ifdef __cplusplus
  32.204 +/* *INDENT-OFF* */
  32.205 +}
  32.206 +/* *INDENT-ON* */
  32.207 +#endif
  32.208 +#include "close_code.h"
  32.209 +
  32.210 +#endif /* _SDL_joystick_h */
  32.211 +
  32.212 +/* vi: set ts=4 sw=4 expandtab: */
    33.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    33.2 +++ b/touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_keyboard.h	Sat Jul 31 01:24:50 2010 +0400
    33.3 @@ -0,0 +1,170 @@
    33.4 +/*
    33.5 +    SDL - Simple DirectMedia Layer
    33.6 +    Copyright (C) 1997-2010 Sam Lantinga
    33.7 +
    33.8 +    This library is free software; you can redistribute it and/or
    33.9 +    modify it under the terms of the GNU Lesser General Public
   33.10 +    License as published by the Free Software Foundation; either
   33.11 +    version 2.1 of the License, or (at your option) any later version.
   33.12 +
   33.13 +    This library is distributed in the hope that it will be useful,
   33.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   33.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   33.16 +    Lesser General Public License for more details.
   33.17 +
   33.18 +    You should have received a copy of the GNU Lesser General Public
   33.19 +    License along with this library; if not, write to the Free Software
   33.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   33.21 +
   33.22 +    Sam Lantinga
   33.23 +    slouken@libsdl.org
   33.24 +*/
   33.25 +
   33.26 +/**
   33.27 + *  \file SDL_keyboard.h
   33.28 + *  
   33.29 + *  Include file for SDL keyboard event handling
   33.30 + */
   33.31 +
   33.32 +#ifndef _SDL_keyboard_h
   33.33 +#define _SDL_keyboard_h
   33.34 +
   33.35 +#include "SDL_stdinc.h"
   33.36 +#include "SDL_error.h"
   33.37 +#include "SDL_keysym.h"
   33.38 +#include "SDL_video.h"
   33.39 +
   33.40 +#include "begin_code.h"
   33.41 +/* Set up for C function definitions, even when using C++ */
   33.42 +#ifdef __cplusplus
   33.43 +/* *INDENT-OFF* */
   33.44 +extern "C" {
   33.45 +/* *INDENT-ON* */
   33.46 +#endif
   33.47 +
   33.48 +/**
   33.49 + *  \brief The SDL keysym structure, used in key events.
   33.50 + */
   33.51 +typedef struct SDL_keysym
   33.52 +{
   33.53 +    SDL_scancode scancode;      /**< SDL physical key code - see ::SDL_scancode for details */
   33.54 +    SDLKey sym;                 /**< SDL virtual key code - see ::SDLKey for details */
   33.55 +    Uint16 mod;                 /**< current key modifiers */
   33.56 +    Uint32 unicode;             /**< \deprecated use SDL_TextInputEvent instead */
   33.57 +} SDL_keysym;
   33.58 +
   33.59 +/* Function prototypes */
   33.60 +
   33.61 +/**
   33.62 + *  \brief Get the window which currently has keyboard focus.
   33.63 + */
   33.64 +extern DECLSPEC SDL_Window * SDLCALL SDL_GetKeyboardFocus(void);
   33.65 +
   33.66 +/**
   33.67 + *  \brief Get a snapshot of the current state of the keyboard.
   33.68 + *  
   33.69 + *  \param numkeys if non-NULL, receives the length of the returned array.
   33.70 + *  
   33.71 + *  \return An array of key states. Indexes into this array are obtained by using ::SDL_scancode values.
   33.72 + *  
   33.73 + *  \b Example:
   33.74 + *  \code
   33.75 + *  Uint8 *state = SDL_GetKeyboardState(NULL);
   33.76 + *  if ( state[SDL_SCANCODE_RETURN] )   {
   33.77 + *      printf("<RETURN> is pressed.\n");
   33.78 + *  }
   33.79 + *  \endcode
   33.80 + */
   33.81 +extern DECLSPEC Uint8 *SDLCALL SDL_GetKeyboardState(int *numkeys);
   33.82 +
   33.83 +/**
   33.84 + *  \brief Get the current key modifier state for the keyboard.
   33.85 + */
   33.86 +extern DECLSPEC SDLMod SDLCALL SDL_GetModState(void);
   33.87 +
   33.88 +/**
   33.89 + *  \brief Set the current key modifier state for the keyboard.
   33.90 + *  
   33.91 + *  \note This does not change the keyboard state, only the key modifier flags.
   33.92 + */
   33.93 +extern DECLSPEC void SDLCALL SDL_SetModState(SDLMod modstate);
   33.94 +
   33.95 +/**
   33.96 + *  \brief Get the key code corresponding to the given scancode according
   33.97 + *         to the current keyboard layout.
   33.98 + *  
   33.99 + *  See ::SDLKey for details.
  33.100 + *  
  33.101 + *  \sa SDL_GetKeyName()
  33.102 + */
  33.103 +extern DECLSPEC SDLKey SDLCALL SDL_GetKeyFromScancode(SDL_scancode scancode);
  33.104 +
  33.105 +/**
  33.106 + *  \brief Get the scancode corresponding to the given key code according to the
  33.107 + *         current keyboard layout.
  33.108 + *  
  33.109 + *  See ::SDL_scancode for details.
  33.110 + *  
  33.111 + *  \sa SDL_GetScancodeName()
  33.112 + */
  33.113 +extern DECLSPEC SDL_scancode SDLCALL SDL_GetScancodeFromKey(SDLKey key);
  33.114 +
  33.115 +/**
  33.116 + *  \brief Get a human-readable name for a scancode.
  33.117 + *  
  33.118 + *  \return A pointer to a UTF-8 string that stays valid at least until the next
  33.119 + *          call to this function. If you need it around any longer, you must 
  33.120 + *          copy it.  If the scancode doesn't have a name, this function returns
  33.121 + *          an empty string ("").
  33.122 + *
  33.123 + *  \sa SDL_scancode
  33.124 + */
  33.125 +extern DECLSPEC const char *SDLCALL SDL_GetScancodeName(SDL_scancode
  33.126 +                                                        scancode);
  33.127 +
  33.128 +/**
  33.129 + *  \brief Get a human-readable name for a key.
  33.130 + *  
  33.131 + *  \return A pointer to a UTF-8 string that stays valid at least until the next
  33.132 + *          call to this function. If you need it around any longer, you must 
  33.133 + *          copy it.  If the key doesn't have a name, this function returns an 
  33.134 + *          empty string ("").
  33.135 + *  
  33.136 + *  \sa SDLKey
  33.137 + */
  33.138 +extern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDLKey key);
  33.139 +
  33.140 +/**
  33.141 + *  \brief Start accepting Unicode text input events.
  33.142 + *  
  33.143 + *  \sa SDL_StopTextInput()
  33.144 + *  \sa SDL_SetTextInputRect()
  33.145 + */
  33.146 +extern DECLSPEC void SDLCALL SDL_StartTextInput(void);
  33.147 +
  33.148 +/**
  33.149 + *  \brief Stop receiving any text input events.
  33.150 + *  
  33.151 + *  \sa SDL_StartTextInput()
  33.152 + */
  33.153 +extern DECLSPEC void SDLCALL SDL_StopTextInput(void);
  33.154 +
  33.155 +/**
  33.156 + *  \brief Set the rectangle used to type Unicode text inputs.
  33.157 + *  
  33.158 + *  \sa SDL_StartTextInput()
  33.159 + */
  33.160 +extern DECLSPEC void SDLCALL SDL_SetTextInputRect(SDL_Rect *rect);
  33.161 +
  33.162 +
  33.163 +/* Ends C function definitions when using C++ */
  33.164 +#ifdef __cplusplus
  33.165 +/* *INDENT-OFF* */
  33.166 +}
  33.167 +/* *INDENT-ON* */
  33.168 +#endif
  33.169 +#include "close_code.h"
  33.170 +
  33.171 +#endif /* _SDL_keyboard_h */
  33.172 +
  33.173 +/* vi: set ts=4 sw=4 expandtab: */
    34.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    34.2 +++ b/touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_keysym.h	Sat Jul 31 01:24:50 2010 +0400
    34.3 @@ -0,0 +1,342 @@
    34.4 +/*
    34.5 +    SDL - Simple DirectMedia Layer
    34.6 +    Copyright (C) 1997-2010 Sam Lantinga
    34.7 +
    34.8 +    This library is free software; you can redistribute it and/or
    34.9 +    modify it under the terms of the GNU Lesser General Public
   34.10 +    License as published by the Free Software Foundation; either
   34.11 +    version 2.1 of the License, or (at your option) any later version.
   34.12 +
   34.13 +    This library is distributed in the hope that it will be useful,
   34.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   34.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   34.16 +    Lesser General Public License for more details.
   34.17 +
   34.18 +    You should have received a copy of the GNU Lesser General Public
   34.19 +    License along with this library; if not, write to the Free Software
   34.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   34.21 +
   34.22 +    Sam Lantinga
   34.23 +    slouken@libsdl.org
   34.24 +*/
   34.25 +
   34.26 +/**
   34.27 + *  \file SDL_keysym.h
   34.28 + *  
   34.29 + *  Defines constants which identify keyboard keys and modifiers.
   34.30 + */
   34.31 +
   34.32 +#ifndef _SDL_keysym_h
   34.33 +#define _SDL_keysym_h
   34.34 +
   34.35 +#include "SDL_stdinc.h"
   34.36 +#include "SDL_scancode.h"
   34.37 +
   34.38 +/**
   34.39 + *  \brief The SDL virtual key representation.
   34.40 + *  
   34.41 + *  Values of this type are used to represent keyboard keys using the current
   34.42 + *  layout of the keyboard.  These values include Unicode values representing
   34.43 + *  the unmodified character that would be generated by pressing the key, or
   34.44 + *  an SDLK_* constant for those keys that do not generate characters.
   34.45 + */
   34.46 +typedef Sint32 SDLKey;
   34.47 +
   34.48 +#define SDLK_SCANCODE_MASK (1<<30)
   34.49 +#define SDL_SCANCODE_TO_KEYCODE(X)	(X | SDLK_SCANCODE_MASK)
   34.50 +
   34.51 +enum
   34.52 +{
   34.53 +    SDLK_UNKNOWN = 0,
   34.54 +
   34.55 +    SDLK_RETURN = '\r',
   34.56 +    SDLK_ESCAPE = '\033',
   34.57 +    SDLK_BACKSPACE = '\b',
   34.58 +    SDLK_TAB = '\t',
   34.59 +    SDLK_SPACE = ' ',
   34.60 +    SDLK_EXCLAIM = '!',
   34.61 +    SDLK_QUOTEDBL = '"',
   34.62 +    SDLK_HASH = '#',
   34.63 +    SDLK_PERCENT = '%',
   34.64 +    SDLK_DOLLAR = '$',
   34.65 +    SDLK_AMPERSAND = '&',
   34.66 +    SDLK_QUOTE = '\'',
   34.67 +    SDLK_LEFTPAREN = '(',
   34.68 +    SDLK_RIGHTPAREN = ')',
   34.69 +    SDLK_ASTERISK = '*',
   34.70 +    SDLK_PLUS = '+',
   34.71 +    SDLK_COMMA = ',',
   34.72 +    SDLK_MINUS = '-',
   34.73 +    SDLK_PERIOD = '.',
   34.74 +    SDLK_SLASH = '/',
   34.75 +    SDLK_0 = '0',
   34.76 +    SDLK_1 = '1',
   34.77 +    SDLK_2 = '2',
   34.78 +    SDLK_3 = '3',
   34.79 +    SDLK_4 = '4',
   34.80 +    SDLK_5 = '5',
   34.81 +    SDLK_6 = '6',
   34.82 +    SDLK_7 = '7',
   34.83 +    SDLK_8 = '8',
   34.84 +    SDLK_9 = '9',
   34.85 +    SDLK_COLON = ':',
   34.86 +    SDLK_SEMICOLON = ';',
   34.87 +    SDLK_LESS = '<',
   34.88 +    SDLK_EQUALS = '=',
   34.89 +    SDLK_GREATER = '>',
   34.90 +    SDLK_QUESTION = '?',
   34.91 +    SDLK_AT = '@',
   34.92 +    /* 
   34.93 +       Skip uppercase letters
   34.94 +     */
   34.95 +    SDLK_LEFTBRACKET = '[',
   34.96 +    SDLK_BACKSLASH = '\\',
   34.97 +    SDLK_RIGHTBRACKET = ']',
   34.98 +    SDLK_CARET = '^',
   34.99 +    SDLK_UNDERSCORE = '_',
  34.100 +    SDLK_BACKQUOTE = '`',
  34.101 +    SDLK_a = 'a',
  34.102 +    SDLK_b = 'b',
  34.103 +    SDLK_c = 'c',
  34.104 +    SDLK_d = 'd',
  34.105 +    SDLK_e = 'e',
  34.106 +    SDLK_f = 'f',
  34.107 +    SDLK_g = 'g',
  34.108 +    SDLK_h = 'h',
  34.109 +    SDLK_i = 'i',
  34.110 +    SDLK_j = 'j',
  34.111 +    SDLK_k = 'k',
  34.112 +    SDLK_l = 'l',
  34.113 +    SDLK_m = 'm',
  34.114 +    SDLK_n = 'n',
  34.115 +    SDLK_o = 'o',
  34.116 +    SDLK_p = 'p',
  34.117 +    SDLK_q = 'q',
  34.118 +    SDLK_r = 'r',
  34.119 +    SDLK_s = 's',
  34.120 +    SDLK_t = 't',
  34.121 +    SDLK_u = 'u',
  34.122 +    SDLK_v = 'v',
  34.123 +    SDLK_w = 'w',
  34.124 +    SDLK_x = 'x',
  34.125 +    SDLK_y = 'y',
  34.126 +    SDLK_z = 'z',
  34.127 +
  34.128 +    SDLK_CAPSLOCK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CAPSLOCK),
  34.129 +
  34.130 +    SDLK_F1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F1),
  34.131 +    SDLK_F2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F2),
  34.132 +    SDLK_F3 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F3),
  34.133 +    SDLK_F4 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F4),
  34.134 +    SDLK_F5 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F5),
  34.135 +    SDLK_F6 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F6),
  34.136 +    SDLK_F7 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F7),
  34.137 +    SDLK_F8 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F8),
  34.138 +    SDLK_F9 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F9),
  34.139 +    SDLK_F10 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F10),
  34.140 +    SDLK_F11 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F11),
  34.141 +    SDLK_F12 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F12),
  34.142 +
  34.143 +    SDLK_PRINTSCREEN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRINTSCREEN),
  34.144 +    SDLK_SCROLLLOCK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SCROLLLOCK),
  34.145 +    SDLK_PAUSE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAUSE),
  34.146 +    SDLK_INSERT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_INSERT),
  34.147 +    SDLK_HOME = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HOME),
  34.148 +    SDLK_PAGEUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEUP),
  34.149 +    SDLK_DELETE = '\177',
  34.150 +    SDLK_END = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_END),
  34.151 +    SDLK_PAGEDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEDOWN),
  34.152 +    SDLK_RIGHT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RIGHT),
  34.153 +    SDLK_LEFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LEFT),
  34.154 +    SDLK_DOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DOWN),
  34.155 +    SDLK_UP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UP),
  34.156 +
  34.157 +    SDLK_NUMLOCKCLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_NUMLOCKCLEAR),
  34.158 +    SDLK_KP_DIVIDE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DIVIDE),
  34.159 +    SDLK_KP_MULTIPLY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MULTIPLY),
  34.160 +    SDLK_KP_MINUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MINUS),
  34.161 +    SDLK_KP_PLUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUS),
  34.162 +    SDLK_KP_ENTER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_ENTER),
  34.163 +    SDLK_KP_1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_1),
  34.164 +    SDLK_KP_2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_2),
  34.165 +    SDLK_KP_3 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_3),
  34.166 +    SDLK_KP_4 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_4),
  34.167 +    SDLK_KP_5 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_5),
  34.168 +    SDLK_KP_6 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_6),
  34.169 +    SDLK_KP_7 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_7),
  34.170 +    SDLK_KP_8 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_8),
  34.171 +    SDLK_KP_9 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_9),
  34.172 +    SDLK_KP_0 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_0),
  34.173 +    SDLK_KP_PERIOD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERIOD),
  34.174 +
  34.175 +    SDLK_APPLICATION = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APPLICATION),
  34.176 +    SDLK_POWER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_POWER),
  34.177 +    SDLK_KP_EQUALS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALS),
  34.178 +    SDLK_F13 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F13),
  34.179 +    SDLK_F14 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F14),
  34.180 +    SDLK_F15 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F15),
  34.181 +    SDLK_F16 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F16),
  34.182 +    SDLK_F17 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F17),
  34.183 +    SDLK_F18 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F18),
  34.184 +    SDLK_F19 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F19),
  34.185 +    SDLK_F20 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F20),
  34.186 +    SDLK_F21 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F21),
  34.187 +    SDLK_F22 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F22),
  34.188 +    SDLK_F23 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F23),
  34.189 +    SDLK_F24 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F24),
  34.190 +    SDLK_EXECUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXECUTE),
  34.191 +    SDLK_HELP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HELP),
  34.192 +    SDLK_MENU = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MENU),
  34.193 +    SDLK_SELECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SELECT),
  34.194 +    SDLK_STOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_STOP),
  34.195 +    SDLK_AGAIN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AGAIN),
  34.196 +    SDLK_UNDO = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UNDO),
  34.197 +    SDLK_CUT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CUT),
  34.198 +    SDLK_COPY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COPY),
  34.199 +    SDLK_PASTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PASTE),
  34.200 +    SDLK_FIND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_FIND),
  34.201 +    SDLK_MUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MUTE),
  34.202 +    SDLK_VOLUMEUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEUP),
  34.203 +    SDLK_VOLUMEDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEDOWN),
  34.204 +    SDLK_KP_COMMA = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COMMA),
  34.205 +    SDLK_KP_EQUALSAS400 =
  34.206 +        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALSAS400),
  34.207 +
  34.208 +    SDLK_ALTERASE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_ALTERASE),
  34.209 +    SDLK_SYSREQ = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SYSREQ),
  34.210 +    SDLK_CANCEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CANCEL),
  34.211 +    SDLK_CLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEAR),
  34.212 +    SDLK_PRIOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRIOR),
  34.213 +    SDLK_RETURN2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RETURN2),
  34.214 +    SDLK_SEPARATOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SEPARATOR),
  34.215 +    SDLK_OUT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OUT),
  34.216 +    SDLK_OPER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OPER),
  34.217 +    SDLK_CLEARAGAIN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEARAGAIN),
  34.218 +    SDLK_CRSEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CRSEL),
  34.219 +    SDLK_EXSEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXSEL),
  34.220 +
  34.221 +    SDLK_KP_00 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_00),
  34.222 +    SDLK_KP_000 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_000),
  34.223 +    SDLK_THOUSANDSSEPARATOR =
  34.224 +        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_THOUSANDSSEPARATOR),
  34.225 +    SDLK_DECIMALSEPARATOR =
  34.226 +        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DECIMALSEPARATOR),
  34.227 +    SDLK_CURRENCYUNIT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYUNIT),
  34.228 +    SDLK_CURRENCYSUBUNIT =
  34.229 +        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYSUBUNIT),
  34.230 +    SDLK_KP_LEFTPAREN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTPAREN),
  34.231 +    SDLK_KP_RIGHTPAREN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTPAREN),
  34.232 +    SDLK_KP_LEFTBRACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTBRACE),
  34.233 +    SDLK_KP_RIGHTBRACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTBRACE),
  34.234 +    SDLK_KP_TAB = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_TAB),
  34.235 +    SDLK_KP_BACKSPACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BACKSPACE),
  34.236 +    SDLK_KP_A = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_A),
  34.237 +    SDLK_KP_B = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_B),
  34.238 +    SDLK_KP_C = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_C),
  34.239 +    SDLK_KP_D = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_D),
  34.240 +    SDLK_KP_E = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_E),
  34.241 +    SDLK_KP_F = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_F),
  34.242 +    SDLK_KP_XOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_XOR),
  34.243 +    SDLK_KP_POWER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_POWER),
  34.244 +    SDLK_KP_PERCENT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERCENT),
  34.245 +    SDLK_KP_LESS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LESS),
  34.246 +    SDLK_KP_GREATER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_GREATER),
  34.247 +    SDLK_KP_AMPERSAND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AMPERSAND),
  34.248 +    SDLK_KP_DBLAMPERSAND =
  34.249 +        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLAMPERSAND),
  34.250 +    SDLK_KP_VERTICALBAR =
  34.251 +        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_VERTICALBAR),
  34.252 +    SDLK_KP_DBLVERTICALBAR =
  34.253 +        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLVERTICALBAR),
  34.254 +    SDLK_KP_COLON = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COLON),
  34.255 +    SDLK_KP_HASH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HASH),
  34.256 +    SDLK_KP_SPACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_SPACE),
  34.257 +    SDLK_KP_AT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AT),
  34.258 +    SDLK_KP_EXCLAM = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EXCLAM),
  34.259 +    SDLK_KP_MEMSTORE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSTORE),
  34.260 +    SDLK_KP_MEMRECALL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMRECALL),
  34.261 +    SDLK_KP_MEMCLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMCLEAR),
  34.262 +    SDLK_KP_MEMADD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMADD),
  34.263 +    SDLK_KP_MEMSUBTRACT =
  34.264 +        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSUBTRACT),
  34.265 +    SDLK_KP_MEMMULTIPLY =
  34.266 +        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMMULTIPLY),
  34.267 +    SDLK_KP_MEMDIVIDE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMDIVIDE),
  34.268 +    SDLK_KP_PLUSMINUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUSMINUS),
  34.269 +    SDLK_KP_CLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEAR),
  34.270 +    SDLK_KP_CLEARENTRY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEARENTRY),
  34.271 +    SDLK_KP_BINARY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BINARY),
  34.272 +    SDLK_KP_OCTAL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_OCTAL),
  34.273 +    SDLK_KP_DECIMAL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DECIMAL),
  34.274 +    SDLK_KP_HEXADECIMAL =
  34.275 +        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HEXADECIMAL),
  34.276 +
  34.277 +    SDLK_LCTRL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LCTRL),
  34.278 +    SDLK_LSHIFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LSHIFT),
  34.279 +    SDLK_LALT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LALT),
  34.280 +    SDLK_LGUI = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LGUI),
  34.281 +    SDLK_RCTRL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RCTRL),
  34.282 +    SDLK_RSHIFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RSHIFT),
  34.283 +    SDLK_RALT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RALT),
  34.284 +    SDLK_RGUI = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RGUI),
  34.285 +
  34.286 +    SDLK_MODE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MODE),
  34.287 +
  34.288 +    SDLK_AUDIONEXT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIONEXT),
  34.289 +    SDLK_AUDIOPREV = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOPREV),
  34.290 +    SDLK_AUDIOSTOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOSTOP),
  34.291 +    SDLK_AUDIOPLAY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOPLAY),
  34.292 +    SDLK_AUDIOMUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOMUTE),
  34.293 +    SDLK_MEDIASELECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIASELECT),
  34.294 +    SDLK_WWW = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_WWW),
  34.295 +    SDLK_MAIL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MAIL),
  34.296 +    SDLK_CALCULATOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CALCULATOR),
  34.297 +    SDLK_COMPUTER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COMPUTER),
  34.298 +    SDLK_AC_SEARCH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_SEARCH),
  34.299 +    SDLK_AC_HOME = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_HOME),
  34.300 +    SDLK_AC_BACK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BACK),
  34.301 +    SDLK_AC_FORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_FORWARD),
  34.302 +    SDLK_AC_STOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_STOP),
  34.303 +    SDLK_AC_REFRESH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_REFRESH),
  34.304 +    SDLK_AC_BOOKMARKS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BOOKMARKS),
  34.305 +
  34.306 +    SDLK_BRIGHTNESSDOWN =
  34.307 +        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_BRIGHTNESSDOWN),
  34.308 +    SDLK_BRIGHTNESSUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_BRIGHTNESSUP),
  34.309 +    SDLK_DISPLAYSWITCH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DISPLAYSWITCH),
  34.310 +    SDLK_KBDILLUMTOGGLE =
  34.311 +        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMTOGGLE),
  34.312 +    SDLK_KBDILLUMDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMDOWN),
  34.313 +    SDLK_KBDILLUMUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMUP),
  34.314 +    SDLK_EJECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EJECT),
  34.315 +    SDLK_SLEEP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SLEEP)
  34.316 +};
  34.317 +
  34.318 +/**
  34.319 + * \brief Enumeration of valid key mods (possibly OR'd together).
  34.320 + */
  34.321 +typedef enum
  34.322 +{
  34.323 +    KMOD_NONE = 0x0000,
  34.324 +    KMOD_LSHIFT = 0x0001,
  34.325 +    KMOD_RSHIFT = 0x0002,
  34.326 +    KMOD_LCTRL = 0x0040,
  34.327 +    KMOD_RCTRL = 0x0080,
  34.328 +    KMOD_LALT = 0x0100,
  34.329 +    KMOD_RALT = 0x0200,
  34.330 +    KMOD_LGUI = 0x0400,
  34.331 +    KMOD_RGUI = 0x0800,
  34.332 +    KMOD_NUM = 0x1000,
  34.333 +    KMOD_CAPS = 0x2000,
  34.334 +    KMOD_MODE = 0x4000,
  34.335 +    KMOD_RESERVED = 0x8000
  34.336 +} SDLMod;
  34.337 +
  34.338 +#define KMOD_CTRL	(KMOD_LCTRL|KMOD_RCTRL)
  34.339 +#define KMOD_SHIFT	(KMOD_LSHIFT|KMOD_RSHIFT)
  34.340 +#define KMOD_ALT	(KMOD_LALT|KMOD_RALT)
  34.341 +#define KMOD_GUI	(KMOD_LGUI|KMOD_RGUI)
  34.342 +
  34.343 +#endif /* _SDL_keysym_h */
  34.344 +
  34.345 +/* vi: set ts=4 sw=4 expandtab: */
    35.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    35.2 +++ b/touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_loadso.h	Sat Jul 31 01:24:50 2010 +0400
    35.3 @@ -0,0 +1,86 @@
    35.4 +/*
    35.5 +    SDL - Simple DirectMedia Layer
    35.6 +    Copyright (C) 1997-2010 Sam Lantinga
    35.7 +
    35.8 +    This library is free software; you can redistribute it and/or
    35.9 +    modify it under the terms of the GNU Lesser General Public
   35.10 +    License as published by the Free Software Foundation; either
   35.11 +    version 2.1 of the License, or (at your option) any later version.
   35.12 +
   35.13 +    This library is distributed in the hope that it will be useful,
   35.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   35.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   35.16 +    Lesser General Public License for more details.
   35.17 +
   35.18 +    You should have received a copy of the GNU Lesser General Public
   35.19 +    License along with this library; if not, write to the Free Software
   35.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   35.21 +
   35.22 +    Sam Lantinga
   35.23 +    slouken@libsdl.org
   35.24 +*/
   35.25 +
   35.26 +/**
   35.27 + *  \file SDL_loadso.h
   35.28 + *
   35.29 + *  System dependent library loading routines
   35.30 + *
   35.31 + *  Some things to keep in mind:                                        
   35.32 + *  \li These functions only work on C function names.  Other languages may
   35.33 + *      have name mangling and intrinsic language support that varies from
   35.34 + *      compiler to compiler.
   35.35 + *  \li Make sure you declare your function pointers with the same calling
   35.36 + *      convention as the actual library function.  Your code will crash
   35.37 + *      mysteriously if you do not do this.
   35.38 + *  \li Avoid namespace collisions.  If you load a symbol from the library,
   35.39 + *      it is not defined whether or not it goes into the global symbol
   35.40 + *      namespace for the application.  If it does and it conflicts with
   35.41 + *      symbols in your code or other shared libraries, you will not get
   35.42 + *      the results you expect. :)
   35.43 + */
   35.44 +
   35.45 +#ifndef _SDL_loadso_h
   35.46 +#define _SDL_loadso_h
   35.47 +
   35.48 +#include "SDL_stdinc.h"
   35.49 +#include "SDL_error.h"
   35.50 +
   35.51 +#include "begin_code.h"
   35.52 +/* Set up for C function definitions, even when using C++ */
   35.53 +#ifdef __cplusplus
   35.54 +/* *INDENT-OFF* */
   35.55 +extern "C" {
   35.56 +/* *INDENT-ON* */
   35.57 +#endif
   35.58 +
   35.59 +/**
   35.60 + *  This function dynamically loads a shared object and returns a pointer
   35.61 + *  to the object handle (or NULL if there was an error).
   35.62 + *  The 'sofile' parameter is a system dependent name of the object file.
   35.63 + */
   35.64 +extern DECLSPEC void *SDLCALL SDL_LoadObject(const char *sofile);
   35.65 +
   35.66 +/**
   35.67 + *  Given an object handle, this function looks up the address of the
   35.68 + *  named function in the shared object and returns it.  This address
   35.69 + *  is no longer valid after calling SDL_UnloadObject().
   35.70 + */
   35.71 +extern DECLSPEC void *SDLCALL SDL_LoadFunction(void *handle,
   35.72 +                                               const char *name);
   35.73 +
   35.74 +/**
   35.75 + *  Unload a shared object from memory.
   35.76 + */
   35.77 +extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle);
   35.78 +
   35.79 +/* Ends C function definitions when using C++ */
   35.80 +#ifdef __cplusplus
   35.81 +/* *INDENT-OFF* */
   35.82 +}
   35.83 +/* *INDENT-ON* */
   35.84 +#endif
   35.85 +#include "close_code.h"
   35.86 +
   35.87 +#endif /* _SDL_loadso_h */
   35.88 +
   35.89 +/* vi: set ts=4 sw=4 expandtab: */
    36.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    36.2 +++ b/touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_main.h	Sat Jul 31 01:24:50 2010 +0400
    36.3 @@ -0,0 +1,96 @@
    36.4 +/*
    36.5 +    SDL - Simple DirectMedia Layer
    36.6 +    Copyright (C) 1997-2010 Sam Lantinga
    36.7 +
    36.8 +    This library is free software; you can redistribute it and/or
    36.9 +    modify it under the terms of the GNU Lesser General Public
   36.10 +    License as published by the Free Software Foundation; either
   36.11 +    version 2.1 of the License, or (at your option) any later version.
   36.12 +
   36.13 +    This library is distributed in the hope that it will be useful,
   36.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   36.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   36.16 +    Lesser General Public License for more details.
   36.17 +
   36.18 +    You should have received a copy of the GNU Lesser General Public
   36.19 +    License along with this library; if not, write to the Free Software
   36.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   36.21 +
   36.22 +    Sam Lantinga
   36.23 +    slouken@libsdl.org
   36.24 +*/
   36.25 +
   36.26 +#ifndef _SDL_main_h
   36.27 +#define _SDL_main_h
   36.28 +
   36.29 +#include "SDL_stdinc.h"
   36.30 +
   36.31 +/**
   36.32 + *  \file SDL_main.h
   36.33 + *  
   36.34 + *  Redefine main() on some platforms so that it is called by SDL.
   36.35 + */
   36.36 +
   36.37 +#if defined(__WIN32__) || \
   36.38 +    (defined(__MWERKS__) && !defined(__BEOS__)) || \
   36.39 +    defined(__SYMBIAN32__) || defined(__IPHONEOS__)
   36.40 +
   36.41 +#ifdef __cplusplus
   36.42 +#define C_LINKAGE	"C"
   36.43 +#else
   36.44 +#define C_LINKAGE
   36.45 +#endif /* __cplusplus */
   36.46 +
   36.47 +/**
   36.48 + *  \file SDL_main.h
   36.49 + *
   36.50 + *  The application's main() function must be called with C linkage,
   36.51 + *  and should be declared like this:
   36.52 + *  \code
   36.53 + *  #ifdef __cplusplus
   36.54 + *  extern "C"
   36.55 + *  #endif
   36.56 + *  int main(int argc, char *argv[])
   36.57 + *  {
   36.58 + *  }
   36.59 + *  \endcode
   36.60 + */
   36.61 +
   36.62 +#define main	SDL_main
   36.63 +
   36.64 +/**
   36.65 + *  The prototype for the application's main() function
   36.66 + */
   36.67 +extern C_LINKAGE int SDL_main(int argc, char *argv[]);
   36.68 +
   36.69 +
   36.70 +/* From the SDL library code -- needed for registering the app on Win32 */
   36.71 +#ifdef __WIN32__
   36.72 +
   36.73 +#include "begin_code.h"
   36.74 +#ifdef __cplusplus
   36.75 +/* *INDENT-OFF* */
   36.76 +extern "C" {
   36.77 +/* *INDENT-ON* */
   36.78 +#endif
   36.79 +
   36.80 +/**
   36.81 + *  This can be called to set the application class at startup
   36.82 + */
   36.83 +extern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style,
   36.84 +                                            void *hInst);
   36.85 +extern DECLSPEC void SDLCALL SDL_UnregisterApp(void);
   36.86 +
   36.87 +#ifdef __cplusplus
   36.88 +/* *INDENT-OFF* */
   36.89 +}
   36.90 +/* *INDENT-ON* */
   36.91 +#endif
   36.92 +#include "close_code.h"
   36.93 +#endif
   36.94 +
   36.95 +#endif /* Need to redefine main()? */
   36.96 +
   36.97 +#endif /* _SDL_main_h */
   36.98 +
   36.99 +/* vi: set ts=4 sw=4 expandtab: */
    37.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    37.2 +++ b/touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_mouse.h	Sat Jul 31 01:24:50 2010 +0400
    37.3 @@ -0,0 +1,205 @@
    37.4 +/*
    37.5 +    SDL - Simple DirectMedia Layer
    37.6 +    Copyright (C) 1997-2010 Sam Lantinga
    37.7 +
    37.8 +    This library is free software; you can redistribute it and/or
    37.9 +    modify it under the terms of the GNU Lesser General Public
   37.10 +    License as published by the Free Software Foundation; either
   37.11 +    version 2.1 of the License, or (at your option) any later version.
   37.12 +
   37.13 +    This library is distributed in the hope that it will be useful,
   37.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   37.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   37.16 +    Lesser General Public License for more details.
   37.17 +
   37.18 +    You should have received a copy of the GNU Lesser General Public
   37.19 +    License along with this library; if not, write to the Free Software
   37.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   37.21 +
   37.22 +    Sam Lantinga
   37.23 +    slouken@libsdl.org
   37.24 +*/
   37.25 +
   37.26 +/**
   37.27 + *  \file SDL_mouse.h
   37.28 + *  
   37.29 + *  Include file for SDL mouse event handling.
   37.30 + *
   37.31 + *  Please note that this ONLY discusses "mice" with the notion of the
   37.32 + *  desktop GUI. You (usually) have one system cursor, and the OS hides
   37.33 + *  the hardware details from you. If you plug in 10 mice, all ten move that
   37.34 + *  one cursor. For many applications and games, this is perfect, and this
   37.35 + *  API has served hundreds of SDL programs well since its birth.
   37.36 + *
   37.37 + *  It's not the whole picture, though. If you want more lowlevel control,
   37.38 + *  SDL offers a different API, that gives you visibility into each input
   37.39 + *  device, multi-touch interfaces, etc.
   37.40 + *
   37.41 + *  Those two APIs are incompatible, and you usually should not use both
   37.42 + *  at the same time. But for legacy purposes, this API refers to a "mouse"
   37.43 + *  when it actually means the system pointer and not a physical mouse.
   37.44 + *
   37.45 + *  The other API is in SDL_input.h
   37.46 + */
   37.47 +
   37.48 +#ifndef _SDL_mouse_h
   37.49 +#define _SDL_mouse_h
   37.50 +
   37.51 +#include "SDL_stdinc.h"
   37.52 +#include "SDL_error.h"
   37.53 +#include "SDL_video.h"
   37.54 +
   37.55 +#include "begin_code.h"
   37.56 +/* Set up for C function definitions, even when using C++ */
   37.57 +#ifdef __cplusplus
   37.58 +/* *INDENT-OFF* */
   37.59 +extern "C" {
   37.60 +/* *INDENT-ON* */
   37.61 +#endif
   37.62 +
   37.63 +typedef struct SDL_Cursor SDL_Cursor;   /* Implementation dependent */
   37.64 +
   37.65 +
   37.66 +/* Function prototypes */
   37.67 +
   37.68 +/**
   37.69 + *  \brief Get the window which currently has mouse focus.
   37.70 + */
   37.71 +extern DECLSPEC SDL_Window * SDLCALL SDL_GetMouseFocus(void);
   37.72 +
   37.73 +/**
   37.74 + *  \brief Retrieve the current state of the mouse.
   37.75 + *  
   37.76 + *  The current button state is returned as a button bitmask, which can
   37.77 + *  be tested using the SDL_BUTTON(X) macros, and x and y are set to the
   37.78 + *  mouse cursor position relative to the focus window for the currently
   37.79 + *  selected mouse.  You can pass NULL for either x or y.
   37.80 + */
   37.81 +extern DECLSPEC Uint8 SDLCALL SDL_GetMouseState(int *x, int *y);
   37.82 +
   37.83 +/**
   37.84 + *  \brief Retrieve the relative state of the mouse.
   37.85 + *
   37.86 + *  The current button state is returned as a button bitmask, which can
   37.87 + *  be tested using the SDL_BUTTON(X) macros, and x and y are set to the
   37.88 + *  mouse deltas since the last call to SDL_GetRelativeMouseState().
   37.89 + */
   37.90 +extern DECLSPEC Uint8 SDLCALL SDL_GetRelativeMouseState(int *x, int *y);
   37.91 +
   37.92 +/**
   37.93 + *  \brief Moves the mouse to the given position within the window.
   37.94 + *  
   37.95 + *  \param window The window to move the mouse into, or NULL for the current mouse focus
   37.96 + *  \param x The x coordinate within the window
   37.97 + *  \param y The y coordinate within the window
   37.98 + *  
   37.99 + *  \note This function generates a mouse motion event
  37.100 + */
  37.101 +extern DECLSPEC void SDLCALL SDL_WarpMouseInWindow(SDL_Window * window,
  37.102 +                                                   int x, int y);
  37.103 +
  37.104 +/**
  37.105 + *  \brief Set relative mouse mode.
  37.106 + *  
  37.107 + *  \param enabled Whether or not to enable relative mode
  37.108 + *
  37.109 + *  \return 0 on success, or -1 if relative mode is not supported.
  37.110 + *  
  37.111 + *  While the mouse is in relative mode, the cursor is hidden, and the
  37.112 + *  driver will try to report continuous motion in the current window.
  37.113 + *  Only relative motion events will be delivered, the mouse position
  37.114 + *  will not change.
  37.115 + *  
  37.116 + *  \note This function will flush any pending mouse motion.
  37.117 + *  
  37.118 + *  \sa SDL_GetRelativeMouseMode()
  37.119 + */
  37.120 +extern DECLSPEC int SDLCALL SDL_SetRelativeMouseMode(SDL_bool enabled);
  37.121 +
  37.122 +/**
  37.123 + *  \brief Query whether relative mouse mode is enabled.
  37.124 + *  
  37.125 + *  \sa SDL_SetRelativeMouseMode()
  37.126 + */
  37.127 +extern DECLSPEC SDL_bool SDLCALL SDL_GetRelativeMouseMode(void);
  37.128 +
  37.129 +/**
  37.130 + *  \brief Create a cursor, using the specified bitmap data and
  37.131 + *         mask (in MSB format).
  37.132 + *  
  37.133 + *  The cursor width must be a multiple of 8 bits.
  37.134 + *  
  37.135 + *  The cursor is created in black and white according to the following:
  37.136 + *  <table>
  37.137 + *  <tr><td> data </td><td> mask </td><td> resulting pixel on screen </td></tr>
  37.138 + *  <tr><td>  0   </td><td>  1   </td><td> White </td></tr>
  37.139 + *  <tr><td>  1   </td><td>  1   </td><td> Black </td></tr>
  37.140 + *  <tr><td>  0   </td><td>  0   </td><td> Transparent </td></tr>
  37.141 + *  <tr><td>  1   </td><td>  0   </td><td> Inverted color if possible, black 
  37.142 + *                                         if not. </td></tr>
  37.143 + *  </table>
  37.144 + *  
  37.145 + *  \sa SDL_FreeCursor()
  37.146 + */
  37.147 +extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateCursor(const Uint8 * data,
  37.148 +                                                     const Uint8 * mask,
  37.149 +                                                     int w, int h, int hot_x,
  37.150 +                                                     int hot_y);
  37.151 +
  37.152 +/**
  37.153 + *  \brief Set the active cursor.
  37.154 + */
  37.155 +extern DECLSPEC void SDLCALL SDL_SetCursor(SDL_Cursor * cursor);
  37.156 +
  37.157 +/**
  37.158 + *  \brief Return the active cursor.
  37.159 + */
  37.160 +extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void);
  37.161 +
  37.162 +/**
  37.163 + *  \brief Frees a cursor created with SDL_CreateCursor().
  37.164 + *  
  37.165 + *  \sa SDL_CreateCursor()
  37.166 + */
  37.167 +extern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor * cursor);
  37.168 +
  37.169 +/**
  37.170 + *  \brief Toggle whether or not the cursor is shown.
  37.171 + *  
  37.172 + *  \param toggle 1 to show the cursor, 0 to hide it, -1 to query the current 
  37.173 + *                state.
  37.174 + *  
  37.175 + *  \return 1 if the cursor is shown, or 0 if the cursor is hidden.
  37.176 + */
  37.177 +extern DECLSPEC int SDLCALL SDL_ShowCursor(int toggle);
  37.178 +
  37.179 +/**
  37.180 + *  Used as a mask when testing buttons in buttonstate.
  37.181 + *   - Button 1:  Left mouse button
  37.182 + *   - Button 2:  Middle mouse button
  37.183 + *   - Button 3:  Right mouse button
  37.184 + */
  37.185 +#define SDL_BUTTON(X)		(1 << ((X)-1))
  37.186 +#define SDL_BUTTON_LEFT		1
  37.187 +#define SDL_BUTTON_MIDDLE	2
  37.188 +#define SDL_BUTTON_RIGHT	3
  37.189 +#define SDL_BUTTON_X1		4
  37.190 +#define SDL_BUTTON_X2		5
  37.191 +#define SDL_BUTTON_LMASK	SDL_BUTTON(SDL_BUTTON_LEFT)
  37.192 +#define SDL_BUTTON_MMASK	SDL_BUTTON(SDL_BUTTON_MIDDLE)
  37.193 +#define SDL_BUTTON_RMASK	SDL_BUTTON(SDL_BUTTON_RIGHT)
  37.194 +#define SDL_BUTTON_X1MASK	SDL_BUTTON(SDL_BUTTON_X1)
  37.195 +#define SDL_BUTTON_X2MASK	SDL_BUTTON(SDL_BUTTON_X2)
  37.196 +
  37.197 +
  37.198 +/* Ends C function definitions when using C++ */
  37.199 +#ifdef __cplusplus
  37.200 +/* *INDENT-OFF* */
  37.201 +}
  37.202 +/* *INDENT-ON* */
  37.203 +#endif
  37.204 +#include "close_code.h"
  37.205 +
  37.206 +#endif /* _SDL_mouse_h */
  37.207 +
  37.208 +/* vi: set ts=4 sw=4 expandtab: */
    38.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    38.2 +++ b/touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_mutex.h	Sat Jul 31 01:24:50 2010 +0400
    38.3 @@ -0,0 +1,223 @@
    38.4 +/*
    38.5 +    SDL - Simple DirectMedia Layer
    38.6 +    Copyright (C) 1997-2010 Sam Lantinga
    38.7 +
    38.8 +    This library is free software; you can redistribute it and/or
    38.9 +    modify it under the terms of the GNU Lesser General Public
   38.10 +    License as published by the Free Software Foundation; either
   38.11 +    version 2.1 of the License, or (at your option) any later version.
   38.12 +
   38.13 +    This library is distributed in the hope that it will be useful,
   38.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   38.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   38.16 +    Lesser General Public License for more details.
   38.17 +
   38.18 +    You should have received a copy of the GNU Lesser General Public
   38.19 +    License along with this library; if not, write to the Free Software
   38.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   38.21 +
   38.22 +    Sam Lantinga
   38.23 +    slouken@libsdl.org
   38.24 +*/
   38.25 +
   38.26 +#ifndef _SDL_mutex_h
   38.27 +#define _SDL_mutex_h
   38.28 +
   38.29 +/**
   38.30 + *  \file SDL_mutex.h
   38.31 + *  
   38.32 + *  Functions to provide thread synchronization primitives.
   38.33 + */
   38.34 +
   38.35 +#include "SDL_stdinc.h"
   38.36 +#include "SDL_error.h"
   38.37 +
   38.38 +#include "begin_code.h"
   38.39 +/* Set up for C function definitions, even when using C++ */
   38.40 +#ifdef __cplusplus
   38.41 +/* *INDENT-OFF* */
   38.42 +extern "C" {
   38.43 +/* *INDENT-ON* */
   38.44 +#endif
   38.45 +
   38.46 +/**
   38.47 + *  Synchronization functions which can time out return this value
   38.48 + *  if they time out.
   38.49 + */
   38.50 +#define SDL_MUTEX_TIMEDOUT	1
   38.51 +
   38.52 +/**
   38.53 + *  This is the timeout value which corresponds to never time out.
   38.54 + */
   38.55 +#define SDL_MUTEX_MAXWAIT	(~(Uint32)0)
   38.56 +
   38.57 +
   38.58 +/**
   38.59 + *  \name Mutex functions
   38.60 + */
   38.61 +/*@{*/
   38.62 +
   38.63 +/* The SDL mutex structure, defined in SDL_mutex.c */
   38.64 +struct SDL_mutex;
   38.65 +typedef struct SDL_mutex SDL_mutex;
   38.66 +
   38.67 +/**
   38.68 + *  Create a mutex, initialized unlocked.
   38.69 + */
   38.70 +extern DECLSPEC SDL_mutex *SDLCALL SDL_CreateMutex(void);
   38.71 +
   38.72 +/**
   38.73 + *  Lock the mutex.
   38.74 + *  
   38.75 + *  \return 0, or -1 on error.
   38.76 + */
   38.77 +#define SDL_LockMutex(m)	SDL_mutexP(m)
   38.78 +extern DECLSPEC int SDLCALL SDL_mutexP(SDL_mutex * mutex);
   38.79 +
   38.80 +/**
   38.81 + *  Unlock the mutex.
   38.82 + *  
   38.83 + *  \return 0, or -1 on error.
   38.84 + *  
   38.85 + *  \warning It is an error to unlock a mutex that has not been locked by
   38.86 + *           the current thread, and doing so results in undefined behavior.
   38.87 + */
   38.88 +#define SDL_UnlockMutex(m)	SDL_mutexV(m)
   38.89 +extern DECLSPEC int SDLCALL SDL_mutexV(SDL_mutex * mutex);
   38.90 +
   38.91 +/** 
   38.92 + *  Destroy a mutex.
   38.93 + */
   38.94 +extern DECLSPEC void SDLCALL SDL_DestroyMutex(SDL_mutex * mutex);
   38.95 +
   38.96 +/*@}*//*Mutex functions*/
   38.97 +
   38.98 +
   38.99 +/**
  38.100 + *  \name Semaphore functions
  38.101 + */
  38.102 +/*@{*/
  38.103 +
  38.104 +/* The SDL semaphore structure, defined in SDL_sem.c */
  38.105 +struct SDL_semaphore;
  38.106 +typedef struct SDL_semaphore SDL_sem;
  38.107 +
  38.108 +/**
  38.109 + *  Create a semaphore, initialized with value, returns NULL on failure.
  38.110 + */
  38.111 +extern DECLSPEC SDL_sem *SDLCALL SDL_CreateSemaphore(Uint32 initial_value);
  38.112 +
  38.113 +/**
  38.114 + *  Destroy a semaphore.
  38.115 + */
  38.116 +extern DECLSPEC void SDLCALL SDL_DestroySemaphore(SDL_sem * sem);
  38.117 +
  38.118 +/**
  38.119 + *  This function suspends the calling thread until the semaphore pointed 
  38.120 + *  to by \c sem has a positive count. It then atomically decreases the 
  38.121 + *  semaphore count.
  38.122 + */
  38.123 +extern DECLSPEC int SDLCALL SDL_SemWait(SDL_sem * sem);
  38.124 +
  38.125 +/**
  38.126 + *  Non-blocking variant of SDL_SemWait().
  38.127 + *  
  38.128 + *  \return 0 if the wait succeeds, ::SDL_MUTEX_TIMEDOUT if the wait would 
  38.129 + *          block, and -1 on error.
  38.130 + */
  38.131 +extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem);
  38.132 +
  38.133 +/**
  38.134 + *  Variant of SDL_SemWait() with a timeout in milliseconds.
  38.135 + *  
  38.136 + *  \return 0 if the wait succeeds, ::SDL_MUTEX_TIMEDOUT if the wait does not 
  38.137 + *          succeed in the allotted time, and -1 on error.
  38.138 + *  
  38.139 + *  \warning On some platforms this function is implemented by looping with a 
  38.140 + *           delay of 1 ms, and so should be avoided if possible.
  38.141 + */
  38.142 +extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem * sem, Uint32 ms);
  38.143 +
  38.144 +/**
  38.145 + *  Atomically increases the semaphore's count (not blocking).
  38.146 + *  
  38.147 + *  \return 0, or -1 on error.
  38.148 + */
  38.149 +extern DECLSPEC int SDLCALL SDL_SemPost(SDL_sem * sem);
  38.150 +
  38.151 +/**
  38.152 + *  Returns the current count of the semaphore.
  38.153 + */
  38.154 +extern DECLSPEC Uint32 SDLCALL SDL_SemValue(SDL_sem * sem);
  38.155 +
  38.156 +/*@}*//*Semaphore functions*/
  38.157 +
  38.158 +
  38.159 +/**
  38.160 + *  \name Condition variable functions
  38.161 + */
  38.162 +/*@{*/
  38.163 +
  38.164 +/* The SDL condition variable structure, defined in SDL_cond.c */
  38.165 +struct SDL_cond;
  38.166 +typedef struct SDL_cond SDL_cond;
  38.167 +
  38.168 +/**
  38.169 + *  Create a condition variable.
  38.170 + */
  38.171 +extern DECLSPEC SDL_cond *SDLCALL SDL_CreateCond(void);
  38.172 +
  38.173 +/**
  38.174 + *  Destroy a condition variable.
  38.175 + */
  38.176 +extern DECLSPEC void SDLCALL SDL_DestroyCond(SDL_cond * cond);
  38.177 +
  38.178 +/**
  38.179 + *  Restart one of the threads that are waiting on the condition variable.
  38.180 + *  
  38.181 + *  \return 0 or -1 on error.
  38.182 + */
  38.183 +extern DECLSPEC int SDLCALL SDL_CondSignal(SDL_cond * cond);
  38.184 +
  38.185 +/**
  38.186 + *  Restart all threads that are waiting on the condition variable.
  38.187 + *  \return 0 or -1 on error.
  38.188 + */
  38.189 +extern DECLSPEC int SDLCALL SDL_CondBroadcast(SDL_cond * cond);
  38.190 +
  38.191 +/**
  38.192 + *  Wait on the condition variable, unlocking the provided mutex.
  38.193 + *  
  38.194 + *  \warning The mutex must be locked before entering this function!
  38.195 + *  
  38.196 + *  The mutex is re-locked once the condition variable is signaled.
  38.197 + *  
  38.198 + *  \return 0 when it is signaled, or -1 on error.
  38.199 + */
  38.200 +extern DECLSPEC int SDLCALL SDL_CondWait(SDL_cond * cond, SDL_mutex * mutex);
  38.201 +
  38.202 +/**
  38.203 + *  Waits for at most \c ms milliseconds, and returns 0 if the condition
  38.204 + *  variable is signaled, ::SDL_MUTEX_TIMEDOUT if the condition is not
  38.205 + *  signaled in the allotted time, and -1 on error.
  38.206 + *
  38.207 + *  \warning On some platforms this function is implemented by looping with a 
  38.208 + *           delay of 1 ms, and so should be avoided if possible.
  38.209 + */
  38.210 +extern DECLSPEC int SDLCALL SDL_CondWaitTimeout(SDL_cond * cond,
  38.211 +                                                SDL_mutex * mutex, Uint32 ms);
  38.212 +
  38.213 +/*@}*//*Condition variable functions*/
  38.214 +
  38.215 +
  38.216 +/* Ends C function definitions when using C++ */
  38.217 +#ifdef __cplusplus
  38.218 +/* *INDENT-OFF* */
  38.219 +}
  38.220 +/* *INDENT-ON* */
  38.221 +#endif
  38.222 +#include "close_code.h"
  38.223 +
  38.224 +#endif /* _SDL_mutex_h */
  38.225 +
  38.226 +/* vi: set ts=4 sw=4 expandtab: */
    39.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    39.2 +++ b/touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_name.h	Sat Jul 31 01:24:50 2010 +0400
    39.3 @@ -0,0 +1,11 @@
    39.4 +
    39.5 +#ifndef _SDLname_h_
    39.6 +#define _SDLname_h_
    39.7 +
    39.8 +#if defined(__STDC__) || defined(__cplusplus)
    39.9 +#define NeedFunctionPrototypes 1
   39.10 +#endif
   39.11 +
   39.12 +#define SDL_NAME(X)	SDL_##X
   39.13 +
   39.14 +#endif /* _SDLname_h_ */
    40.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    40.2 +++ b/touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_opengl.h	Sat Jul 31 01:24:50 2010 +0400
    40.3 @@ -0,0 +1,9333 @@
    40.4 +/*
    40.5 +    SDL - Simple DirectMedia Layer
    40.6 +    Copyright (C) 1997-2010 Sam Lantinga
    40.7 +
    40.8 +    This library is free software; you can redistribute it and/or
    40.9 +    modify it under the terms of the GNU Lesser General Public
   40.10 +    License as published by the Free Software Foundation; either
   40.11 +    version 2.1 of the License, or (at your option) any later version.
   40.12 +
   40.13 +    This library is distributed in the hope that it will be useful,
   40.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   40.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   40.16 +    Lesser General Public License for more details.
   40.17 +
   40.18 +    You should have received a copy of the GNU Lesser General Public
   40.19 +    License along with this library; if not, write to the Free Software
   40.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   40.21 +
   40.22 +    Sam Lantinga
   40.23 +    slouken@libsdl.org
   40.24 +*/
   40.25 +
   40.26 +/**
   40.27 + *  \file SDL_opengl.h
   40.28 + *  
   40.29 + *  This is a simple file to encapsulate the OpenGL API headers.
   40.30 + */
   40.31 +
   40.32 +#ifndef _SDL_opengl_h
   40.33 +#define _SDL_opengl_h
   40.34 +
   40.35 +#include "SDL_config.h"
   40.36 +
   40.37 +#ifdef __WIN32__
   40.38 +#define WIN32_LEAN_AND_MEAN
   40.39 +#ifndef NOMINMAX
   40.40 +#define NOMINMAX                /* Don't defined min() and max() */
   40.41 +#endif
   40.42 +#include <windows.h>
   40.43 +#endif
   40.44 +#ifndef NO_SDL_GLEXT
   40.45 +#define __glext_h_              /* Don't let gl.h include glext.h */
   40.46 +#endif
   40.47 +#if defined(__MACOSX__)
   40.48 +#include <OpenGL/gl.h>          /* Header File For The OpenGL Library */
   40.49 +#include <OpenGL/glu.h>         /* Header File For The GLU Library */
   40.50 +#define __X_GL_H
   40.51 +#else
   40.52 +#include <GL/gl.h>              /* Header File For The OpenGL Library */
   40.53 +#include <GL/glu.h>             /* Header File For The GLU Library */
   40.54 +#endif
   40.55 +#ifndef NO_SDL_GLEXT
   40.56 +#undef __glext_h_
   40.57 +#endif
   40.58 +
   40.59 +/**
   40.60 + *  \file SDL_opengl.h
   40.61 + *  
   40.62 + *  This file is included because glext.h is not available on some systems.
   40.63 + *  If you don't want this version included, simply define ::NO_SDL_GLEXT.
   40.64 + *  
   40.65 + *  The latest version is available from:
   40.66 + *  	http://www.opengl.org/registry/
   40.67 + */
   40.68 +
   40.69 +/**
   40.70 + *  \def NO_SDL_GLEXT
   40.71 + *  
   40.72 + *  Define this if you have your own version of glext.h and want to disable the 
   40.73 + *  version included in SDL_opengl.h.
   40.74 + */
   40.75 +
   40.76 +#if !defined(NO_SDL_GLEXT) && !defined(GL_GLEXT_LEGACY)
   40.77 +/* *INDENT-OFF* */
   40.78 +#ifndef __glext_h_
   40.79 +#define __glext_h_
   40.80 +
   40.81 +#ifdef __cplusplus
   40.82 +extern "C" {
   40.83 +#endif
   40.84 +
   40.85 +/*
   40.86 +** Copyright (c) 2007-2009 The Khronos Group Inc.
   40.87 +** 
   40.88 +** Permission is hereby granted, free of charge, to any person obtaining a
   40.89 +** copy of this software and/or associated documentation files (the
   40.90 +** "Materials"), to deal in the Materials without restriction, including
   40.91 +** without limitation the rights to use, copy, modify, merge, publish,
   40.92 +** distribute, sublicense, and/or sell copies of the Materials, and to
   40.93 +** permit persons to whom the Materials are furnished to do so, subject to
   40.94 +** the following conditions:
   40.95 +** 
   40.96 +** The above copyright notice and this permission notice shall be included
   40.97 +** in all copies or substantial portions of the Materials.
   40.98 +** 
   40.99 +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  40.100 +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  40.101 +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  40.102 +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  40.103 +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  40.104 +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  40.105 +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
  40.106 +*/
  40.107 +
  40.108 +/* Header file version number, required by OpenGL ABI for Linux */
  40.109 +/* glext.h last updated $Date$ */
  40.110 +/* Current version at http://www.opengl.org/registry/ */
  40.111 +#define GL_GLEXT_VERSION 54
  40.112 +
  40.113 +/* Function declaration macros - to move into glplatform.h */
  40.114 +
  40.115 +#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
  40.116 +#define WIN32_LEAN_AND_MEAN 1
  40.117 +#include <windows.h>
  40.118 +#endif
  40.119 +
  40.120 +#ifndef APIENTRY
  40.121 +#define APIENTRY
  40.122 +#endif
  40.123 +#ifndef APIENTRYP
  40.124 +#define APIENTRYP APIENTRY *
  40.125 +#endif
  40.126 +#ifndef GLAPI
  40.127 +#define GLAPI extern
  40.128 +#endif
  40.129 +
  40.130 +/*************************************************************/
  40.131 +
  40.132 +#ifndef GL_VERSION_1_2
  40.133 +#define GL_UNSIGNED_BYTE_3_3_2            0x8032
  40.134 +#define GL_UNSIGNED_SHORT_4_4_4_4         0x8033
  40.135 +#define GL_UNSIGNED_SHORT_5_5_5_1         0x8034
  40.136 +#define GL_UNSIGNED_INT_8_8_8_8           0x8035
  40.137 +#define GL_UNSIGNED_INT_10_10_10_2        0x8036
  40.138 +#define GL_TEXTURE_BINDING_3D             0x806A
  40.139 +#define GL_PACK_SKIP_IMAGES               0x806B
  40.140 +#define GL_PACK_IMAGE_HEIGHT              0x806C
  40.141 +#define GL_UNPACK_SKIP_IMAGES             0x806D
  40.142 +#define GL_UNPACK_IMAGE_HEIGHT            0x806E
  40.143 +#define GL_TEXTURE_3D                     0x806F
  40.144 +#define GL_PROXY_TEXTURE_3D               0x8070
  40.145 +#define GL_TEXTURE_DEPTH                  0x8071
  40.146 +#define GL_TEXTURE_WRAP_R                 0x8072
  40.147 +#define GL_MAX_3D_TEXTURE_SIZE            0x8073
  40.148 +#define GL_UNSIGNED_BYTE_2_3_3_REV        0x8362
  40.149 +#define GL_UNSIGNED_SHORT_5_6_5           0x8363
  40.150 +#define GL_UNSIGNED_SHORT_5_6_5_REV       0x8364
  40.151 +#define GL_UNSIGNED_SHORT_4_4_4_4_REV     0x8365
  40.152 +#define GL_UNSIGNED_SHORT_1_5_5_5_REV     0x8366
  40.153 +#define GL_UNSIGNED_INT_8_8_8_8_REV       0x8367
  40.154 +#define GL_UNSIGNED_INT_2_10_10_10_REV    0x8368
  40.155 +#define GL_BGR                            0x80E0
  40.156 +#define GL_BGRA                           0x80E1
  40.157 +#define GL_MAX_ELEMENTS_VERTICES          0x80E8
  40.158 +#define GL_MAX_ELEMENTS_INDICES           0x80E9
  40.159 +#define GL_CLAMP_TO_EDGE                  0x812F
  40.160 +#define GL_TEXTURE_MIN_LOD                0x813A
  40.161 +#define GL_TEXTURE_MAX_LOD                0x813B
  40.162 +#define GL_TEXTURE_BASE_LEVEL             0x813C
  40.163 +#define GL_TEXTURE_MAX_LEVEL              0x813D
  40.164 +#define GL_SMOOTH_POINT_SIZE_RANGE        0x0B12
  40.165 +#define GL_SMOOTH_POINT_SIZE_GRANULARITY  0x0B13
  40.166 +#define GL_SMOOTH_LINE_WIDTH_RANGE        0x0B22
  40.167 +#define GL_SMOOTH_LINE_WIDTH_GRANULARITY  0x0B23
  40.168 +#define GL_ALIASED_LINE_WIDTH_RANGE       0x846E
  40.169 +#endif
  40.170 +
  40.171 +#ifndef GL_VERSION_1_2_DEPRECATED
  40.172 +#define GL_RESCALE_NORMAL                 0x803A
  40.173 +#define GL_LIGHT_MODEL_COLOR_CONTROL      0x81F8
  40.174 +#define GL_SINGLE_COLOR                   0x81F9
  40.175 +#define GL_SEPARATE_SPECULAR_COLOR        0x81FA
  40.176 +#define GL_ALIASED_POINT_SIZE_RANGE       0x846D
  40.177 +#endif
  40.178 +
  40.179 +#ifndef GL_ARB_imaging
  40.180 +#define GL_CONSTANT_COLOR                 0x8001
  40.181 +#define GL_ONE_MINUS_CONSTANT_COLOR       0x8002
  40.182 +#define GL_CONSTANT_ALPHA                 0x8003
  40.183 +#define GL_ONE_MINUS_CONSTANT_ALPHA       0x8004
  40.184 +#define GL_BLEND_COLOR                    0x8005
  40.185 +#define GL_FUNC_ADD                       0x8006
  40.186 +#define GL_MIN                            0x8007
  40.187 +#define GL_MAX                            0x8008
  40.188 +#define GL_BLEND_EQUATION                 0x8009
  40.189 +#define GL_FUNC_SUBTRACT                  0x800A
  40.190 +#define GL_FUNC_REVERSE_SUBTRACT          0x800B
  40.191 +#endif
  40.192 +
  40.193 +#ifndef GL_ARB_imaging_DEPRECATED
  40.194 +#define GL_CONVOLUTION_1D                 0x8010
  40.195 +#define GL_CONVOLUTION_2D                 0x8011
  40.196 +#define GL_SEPARABLE_2D                   0x8012
  40.197 +#define GL_CONVOLUTION_BORDER_MODE        0x8013
  40.198 +#define GL_CONVOLUTION_FILTER_SCALE       0x8014
  40.199 +#define GL_CONVOLUTION_FILTER_BIAS        0x8015
  40.200 +#define GL_REDUCE                         0x8016
  40.201 +#define GL_CONVOLUTION_FORMAT             0x8017
  40.202 +#define GL_CONVOLUTION_WIDTH              0x8018
  40.203 +#define GL_CONVOLUTION_HEIGHT             0x8019
  40.204 +#define GL_MAX_CONVOLUTION_WIDTH          0x801A
  40.205 +#define GL_MAX_CONVOLUTION_HEIGHT         0x801B
  40.206 +#define GL_POST_CONVOLUTION_RED_SCALE     0x801C
  40.207 +#define GL_POST_CONVOLUTION_GREEN_SCALE   0x801D
  40.208 +#define GL_POST_CONVOLUTION_BLUE_SCALE    0x801E
  40.209 +#define GL_POST_CONVOLUTION_ALPHA_SCALE   0x801F
  40.210 +#define GL_POST_CONVOLUTION_RED_BIAS      0x8020
  40.211 +#define GL_POST_CONVOLUTION_GREEN_BIAS    0x8021
  40.212 +#define GL_POST_CONVOLUTION_BLUE_BIAS     0x8022
  40.213 +#define GL_POST_CONVOLUTION_ALPHA_BIAS    0x8023
  40.214 +#define GL_HISTOGRAM                      0x8024
  40.215 +#define GL_PROXY_HISTOGRAM                0x8025
  40.216 +#define GL_HISTOGRAM_WIDTH                0x8026
  40.217 +#define GL_HISTOGRAM_FORMAT               0x8027
  40.218 +#define GL_HISTOGRAM_RED_SIZE             0x8028
  40.219 +#define GL_HISTOGRAM_GREEN_SIZE           0x8029
  40.220 +#define GL_HISTOGRAM_BLUE_SIZE            0x802A
  40.221 +#define GL_HISTOGRAM_ALPHA_SIZE           0x802B
  40.222 +#define GL_HISTOGRAM_LUMINANCE_SIZE       0x802C
  40.223 +#define GL_HISTOGRAM_SINK                 0x802D
  40.224 +#define GL_MINMAX                         0x802E
  40.225 +#define GL_MINMAX_FORMAT                  0x802F
  40.226 +#define GL_MINMAX_SINK                    0x8030
  40.227 +#define GL_TABLE_TOO_LARGE                0x8031
  40.228 +#define GL_COLOR_MATRIX                   0x80B1
  40.229 +#define GL_COLOR_MATRIX_STACK_DEPTH       0x80B2
  40.230 +#define GL_MAX_COLOR_MATRIX_STACK_DEPTH   0x80B3
  40.231 +#define GL_POST_COLOR_MATRIX_RED_SCALE    0x80B4
  40.232 +#define GL_POST_COLOR_MATRIX_GREEN_SCALE  0x80B5
  40.233 +#define GL_POST_COLOR_MATRIX_BLUE_SCALE   0x80B6
  40.234 +#define GL_POST_COLOR_MATRIX_ALPHA_SCALE  0x80B7
  40.235 +#define GL_POST_COLOR_MATRIX_RED_BIAS     0x80B8
  40.236 +#define GL_POST_COLOR_MATRIX_GREEN_BIAS   0x80B9
  40.237 +#define GL_POST_COLOR_MATRIX_BLUE_BIAS    0x80BA
  40.238 +#define GL_POST_COLOR_MATRIX_ALPHA_BIAS   0x80BB
  40.239 +#define GL_COLOR_TABLE                    0x80D0
  40.240 +#define GL_POST_CONVOLUTION_COLOR_TABLE   0x80D1
  40.241 +#define GL_POST_COLOR_MATRIX_COLOR_TABLE  0x80D2
  40.242 +#define GL_PROXY_COLOR_TABLE              0x80D3
  40.243 +#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
  40.244 +#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
  40.245 +#define GL_COLOR_TABLE_SCALE              0x80D6
  40.246 +#define GL_COLOR_TABLE_BIAS               0x80D7
  40.247 +#define GL_COLOR_TABLE_FORMAT             0x80D8
  40.248 +#define GL_COLOR_TABLE_WIDTH              0x80D9
  40.249 +#define GL_COLOR_TABLE_RED_SIZE           0x80DA
  40.250 +#define GL_COLOR_TABLE_GREEN_SIZE         0x80DB
  40.251 +#define GL_COLOR_TABLE_BLUE_SIZE          0x80DC
  40.252 +#define GL_COLOR_TABLE_ALPHA_SIZE         0x80DD
  40.253 +#define GL_COLOR_TABLE_LUMINANCE_SIZE     0x80DE
  40.254 +#define GL_COLOR_TABLE_INTENSITY_SIZE     0x80DF
  40.255 +#define GL_CONSTANT_BORDER                0x8151
  40.256 +#define GL_REPLICATE_BORDER               0x8153
  40.257 +#define GL_CONVOLUTION_BORDER_COLOR       0x8154
  40.258 +#endif
  40.259 +
  40.260 +#ifndef GL_VERSION_1_3
  40.261 +#define GL_TEXTURE0                       0x84C0
  40.262 +#define GL_TEXTURE1                       0x84C1
  40.263 +#define GL_TEXTURE2                       0x84C2
  40.264 +#define GL_TEXTURE3                       0x84C3
  40.265 +#define GL_TEXTURE4                       0x84C4
  40.266 +#define GL_TEXTURE5                       0x84C5
  40.267 +#define GL_TEXTURE6                       0x84C6
  40.268 +#define GL_TEXTURE7                       0x84C7
  40.269 +#define GL_TEXTURE8                       0x84C8
  40.270 +#define GL_TEXTURE9                       0x84C9
  40.271 +#define GL_TEXTURE10                      0x84CA
  40.272 +#define GL_TEXTURE11                      0x84CB
  40.273 +#define GL_TEXTURE12                      0x84CC
  40.274 +#define GL_TEXTURE13                      0x84CD
  40.275 +#define GL_TEXTURE14                      0x84CE
  40.276 +#define GL_TEXTURE15                      0x84CF
  40.277 +#define GL_TEXTURE16                      0x84D0
  40.278 +#define GL_TEXTURE17                      0x84D1
  40.279 +#define GL_TEXTURE18                      0x84D2
  40.280 +#define GL_TEXTURE19                      0x84D3
  40.281 +#define GL_TEXTURE20                      0x84D4
  40.282 +#define GL_TEXTURE21                      0x84D5
  40.283 +#define GL_TEXTURE22                      0x84D6
  40.284 +#define GL_TEXTURE23                      0x84D7
  40.285 +#define GL_TEXTURE24                      0x84D8
  40.286 +#define GL_TEXTURE25                      0x84D9
  40.287 +#define GL_TEXTURE26                      0x84DA
  40.288 +#define GL_TEXTURE27                      0x84DB
  40.289 +#define GL_TEXTURE28                      0x84DC
  40.290 +#define GL_TEXTURE29                      0x84DD
  40.291 +#define GL_TEXTURE30                      0x84DE
  40.292 +#define GL_TEXTURE31                      0x84DF
  40.293 +#define GL_ACTIVE_TEXTURE                 0x84E0
  40.294 +#define GL_MULTISAMPLE                    0x809D
  40.295 +#define GL_SAMPLE_ALPHA_TO_COVERAGE       0x809E
  40.296 +#define GL_SAMPLE_ALPHA_TO_ONE            0x809F
  40.297 +#define GL_SAMPLE_COVERAGE                0x80A0
  40.298 +#define GL_SAMPLE_BUFFERS                 0x80A8
  40.299 +#define GL_SAMPLES                        0x80A9
  40.300 +#define GL_SAMPLE_COVERAGE_VALUE          0x80AA
  40.301 +#define GL_SAMPLE_COVERAGE_INVERT         0x80AB
  40.302 +#define GL_TEXTURE_CUBE_MAP               0x8513
  40.303 +#define GL_TEXTURE_BINDING_CUBE_MAP       0x8514
  40.304 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X    0x8515
  40.305 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X    0x8516
  40.306 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y    0x8517
  40.307 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y    0x8518
  40.308 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z    0x8519
  40.309 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z    0x851A
  40.310 +#define GL_PROXY_TEXTURE_CUBE_MAP         0x851B
  40.311 +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE      0x851C
  40.312 +#define GL_COMPRESSED_RGB                 0x84ED
  40.313 +#define GL_COMPRESSED_RGBA                0x84EE
  40.314 +#define GL_TEXTURE_COMPRESSION_HINT       0x84EF
  40.315 +#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE  0x86A0
  40.316 +#define GL_TEXTURE_COMPRESSED             0x86A1
  40.317 +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
  40.318 +#define GL_COMPRESSED_TEXTURE_FORMATS     0x86A3
  40.319 +#define GL_CLAMP_TO_BORDER                0x812D
  40.320 +#endif
  40.321 +
  40.322 +#ifndef GL_VERSION_1_3_DEPRECATED
  40.323 +#define GL_CLIENT_ACTIVE_TEXTURE          0x84E1
  40.324 +#define GL_MAX_TEXTURE_UNITS              0x84E2
  40.325 +#define GL_TRANSPOSE_MODELVIEW_MATRIX     0x84E3
  40.326 +#define GL_TRANSPOSE_PROJECTION_MATRIX    0x84E4
  40.327 +#define GL_TRANSPOSE_TEXTURE_MATRIX       0x84E5
  40.328 +#define GL_TRANSPOSE_COLOR_MATRIX         0x84E6
  40.329 +#define GL_MULTISAMPLE_BIT                0x20000000
  40.330 +#define GL_NORMAL_MAP                     0x8511
  40.331 +#define GL_REFLECTION_MAP                 0x8512
  40.332 +#define GL_COMPRESSED_ALPHA               0x84E9
  40.333 +#define GL_COMPRESSED_LUMINANCE           0x84EA
  40.334 +#define GL_COMPRESSED_LUMINANCE_ALPHA     0x84EB
  40.335 +#define GL_COMPRESSED_INTENSITY           0x84EC
  40.336 +#define GL_COMBINE                        0x8570
  40.337 +#define GL_COMBINE_RGB                    0x8571
  40.338 +#define GL_COMBINE_ALPHA                  0x8572
  40.339 +#define GL_SOURCE0_RGB                    0x8580
  40.340 +#define GL_SOURCE1_RGB                    0x8581
  40.341 +#define GL_SOURCE2_RGB                    0x8582
  40.342 +#define GL_SOURCE0_ALPHA                  0x8588
  40.343 +#define GL_SOURCE1_ALPHA                  0x8589
  40.344 +#define GL_SOURCE2_ALPHA                  0x858A
  40.345 +#define GL_OPERAND0_RGB                   0x8590
  40.346 +#define GL_OPERAND1_RGB                   0x8591
  40.347 +#define GL_OPERAND2_RGB                   0x8592
  40.348 +#define GL_OPERAND0_ALPHA                 0x8598
  40.349 +#define GL_OPERAND1_ALPHA                 0x8599
  40.350 +#define GL_OPERAND2_ALPHA                 0x859A
  40.351 +#define GL_RGB_SCALE                      0x8573
  40.352 +#define GL_ADD_SIGNED                     0x8574
  40.353 +#define GL_INTERPOLATE                    0x8575
  40.354 +#define GL_SUBTRACT                       0x84E7
  40.355 +#define GL_CONSTANT                       0x8576
  40.356 +#define GL_PRIMARY_COLOR                  0x8577
  40.357 +#define GL_PREVIOUS                       0x8578
  40.358 +#define GL_DOT3_RGB                       0x86AE
  40.359 +#define GL_DOT3_RGBA                      0x86AF
  40.360 +#endif
  40.361 +
  40.362 +#ifndef GL_VERSION_1_4
  40.363 +#define GL_BLEND_DST_RGB                  0x80C8
  40.364 +#define GL_BLEND_SRC_RGB                  0x80C9
  40.365 +#define GL_BLEND_DST_ALPHA                0x80CA
  40.366 +#define GL_BLEND_SRC_ALPHA                0x80CB
  40.367 +#define GL_POINT_FADE_THRESHOLD_SIZE      0x8128
  40.368 +#define GL_DEPTH_COMPONENT16              0x81A5
  40.369 +#define GL_DEPTH_COMPONENT24              0x81A6
  40.370 +#define GL_DEPTH_COMPONENT32              0x81A7
  40.371 +#define GL_MIRRORED_REPEAT                0x8370
  40.372 +#define GL_MAX_TEXTURE_LOD_BIAS           0x84FD
  40.373 +#define GL_TEXTURE_LOD_BIAS               0x8501
  40.374 +#define GL_INCR_WRAP                      0x8507
  40.375 +#define GL_DECR_WRAP                      0x8508
  40.376 +#define GL_TEXTURE_DEPTH_SIZE             0x884A
  40.377 +#define GL_TEXTURE_COMPARE_MODE           0x884C
  40.378 +#define GL_TEXTURE_COMPARE_FUNC           0x884D
  40.379 +#endif
  40.380 +
  40.381 +#ifndef GL_VERSION_1_4_DEPRECATED
  40.382 +#define GL_POINT_SIZE_MIN                 0x8126
  40.383 +#define GL_POINT_SIZE_MAX                 0x8127
  40.384 +#define GL_POINT_DISTANCE_ATTENUATION     0x8129
  40.385 +#define GL_GENERATE_MIPMAP                0x8191
  40.386 +#define GL_GENERATE_MIPMAP_HINT           0x8192
  40.387 +#define GL_FOG_COORDINATE_SOURCE          0x8450
  40.388 +#define GL_FOG_COORDINATE                 0x8451
  40.389 +#define GL_FRAGMENT_DEPTH                 0x8452
  40.390 +#define GL_CURRENT_FOG_COORDINATE         0x8453
  40.391 +#define GL_FOG_COORDINATE_ARRAY_TYPE      0x8454
  40.392 +#define GL_FOG_COORDINATE_ARRAY_STRIDE    0x8455
  40.393 +#define GL_FOG_COORDINATE_ARRAY_POINTER   0x8456
  40.394 +#define GL_FOG_COORDINATE_ARRAY           0x8457
  40.395 +#define GL_COLOR_SUM                      0x8458
  40.396 +#define GL_CURRENT_SECONDARY_COLOR        0x8459
  40.397 +#define GL_SECONDARY_COLOR_ARRAY_SIZE     0x845A
  40.398 +#define GL_SECONDARY_COLOR_ARRAY_TYPE     0x845B
  40.399 +#define GL_SECONDARY_COLOR_ARRAY_STRIDE   0x845C
  40.400 +#define GL_SECONDARY_COLOR_ARRAY_POINTER  0x845D
  40.401 +#define GL_SECONDARY_COLOR_ARRAY          0x845E
  40.402 +#define GL_TEXTURE_FILTER_CONTROL         0x8500
  40.403 +#define GL_DEPTH_TEXTURE_MODE             0x884B
  40.404 +#define GL_COMPARE_R_TO_TEXTURE           0x884E
  40.405 +#endif
  40.406 +
  40.407 +#ifndef GL_VERSION_1_5
  40.408 +#define GL_BUFFER_SIZE                    0x8764
  40.409 +#define GL_BUFFER_USAGE                   0x8765
  40.410 +#define GL_QUERY_COUNTER_BITS             0x8864
  40.411 +#define GL_CURRENT_QUERY                  0x8865
  40.412 +#define GL_QUERY_RESULT                   0x8866
  40.413 +#define GL_QUERY_RESULT_AVAILABLE         0x8867
  40.414 +#define GL_ARRAY_BUFFER                   0x8892
  40.415 +#define GL_ELEMENT_ARRAY_BUFFER           0x8893
  40.416 +#define GL_ARRAY_BUFFER_BINDING           0x8894
  40.417 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING   0x8895
  40.418 +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
  40.419 +#define GL_READ_ONLY                      0x88B8
  40.420 +#define GL_WRITE_ONLY                     0x88B9
  40.421 +#define GL_READ_WRITE                     0x88BA
  40.422 +#define GL_BUFFER_ACCESS                  0x88BB
  40.423 +#define GL_BUFFER_MAPPED                  0x88BC
  40.424 +#define GL_BUFFER_MAP_POINTER             0x88BD
  40.425 +#define GL_STREAM_DRAW                    0x88E0
  40.426 +#define GL_STREAM_READ                    0x88E1
  40.427 +#define GL_STREAM_COPY                    0x88E2
  40.428 +#define GL_STATIC_DRAW                    0x88E4
  40.429 +#define GL_STATIC_READ                    0x88E5
  40.430 +#define GL_STATIC_COPY                    0x88E6
  40.431 +#define GL_DYNAMIC_DRAW                   0x88E8
  40.432 +#define GL_DYNAMIC_READ                   0x88E9
  40.433 +#define GL_DYNAMIC_COPY                   0x88EA
  40.434 +#define GL_SAMPLES_PASSED                 0x8914
  40.435 +#endif
  40.436 +
  40.437 +#ifndef GL_VERSION_1_5_DEPRECATED
  40.438 +#define GL_VERTEX_ARRAY_BUFFER_BINDING    0x8896
  40.439 +#define GL_NORMAL_ARRAY_BUFFER_BINDING    0x8897
  40.440 +#define GL_COLOR_ARRAY_BUFFER_BINDING     0x8898
  40.441 +#define GL_INDEX_ARRAY_BUFFER_BINDING     0x8899
  40.442 +#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A
  40.443 +#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B
  40.444 +#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C
  40.445 +#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D
  40.446 +#define GL_WEIGHT_ARRAY_BUFFER_BINDING    0x889E
  40.447 +#define GL_FOG_COORD_SRC                  0x8450
  40.448 +#define GL_FOG_COORD                      0x8451
  40.449 +#define GL_CURRENT_FOG_COORD              0x8453
  40.450 +#define GL_FOG_COORD_ARRAY_TYPE           0x8454
  40.451 +#define GL_FOG_COORD_ARRAY_STRIDE         0x8455
  40.452 +#define GL_FOG_COORD_ARRAY_POINTER        0x8456
  40.453 +#define GL_FOG_COORD_ARRAY                0x8457
  40.454 +#define GL_FOG_COORD_ARRAY_BUFFER_BINDING 0x889D
  40.455 +#define GL_SRC0_RGB                       0x8580
  40.456 +#define GL_SRC1_RGB                       0x8581
  40.457 +#define GL_SRC2_RGB                       0x8582
  40.458 +#define GL_SRC0_ALPHA                     0x8588
  40.459 +#define GL_SRC1_ALPHA                     0x8589
  40.460 +#define GL_SRC2_ALPHA                     0x858A
  40.461 +#endif
  40.462 +
  40.463 +#ifndef GL_VERSION_2_0
  40.464 +#define GL_BLEND_EQUATION_RGB             0x8009
  40.465 +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED    0x8622
  40.466 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE       0x8623
  40.467 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE     0x8624
  40.468 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE       0x8625
  40.469 +#define GL_CURRENT_VERTEX_ATTRIB          0x8626
  40.470 +#define GL_VERTEX_PROGRAM_POINT_SIZE      0x8642
  40.471 +#define GL_VERTEX_ATTRIB_ARRAY_POINTER    0x8645
  40.472 +#define GL_STENCIL_BACK_FUNC              0x8800
  40.473 +#define GL_STENCIL_BACK_FAIL              0x8801
  40.474 +#define GL_STENCIL_BACK_PASS_DEPTH_FAIL   0x8802
  40.475 +#define GL_STENCIL_BACK_PASS_DEPTH_PASS   0x8803
  40.476 +#define GL_MAX_DRAW_BUFFERS               0x8824
  40.477 +#define GL_DRAW_BUFFER0                   0x8825
  40.478 +#define GL_DRAW_BUFFER1                   0x8826
  40.479 +#define GL_DRAW_BUFFER2                   0x8827
  40.480 +#define GL_DRAW_BUFFER3                   0x8828
  40.481 +#define GL_DRAW_BUFFER4                   0x8829
  40.482 +#define GL_DRAW_BUFFER5                   0x882A
  40.483 +#define GL_DRAW_BUFFER6                   0x882B
  40.484 +#define GL_DRAW_BUFFER7                   0x882C
  40.485 +#define GL_DRAW_BUFFER8                   0x882D
  40.486 +#define GL_DRAW_BUFFER9                   0x882E
  40.487 +#define GL_DRAW_BUFFER10                  0x882F
  40.488 +#define GL_DRAW_BUFFER11                  0x8830
  40.489 +#define GL_DRAW_BUFFER12                  0x8831
  40.490 +#define GL_DRAW_BUFFER13                  0x8832
  40.491 +#define GL_DRAW_BUFFER14                  0x8833
  40.492 +#define GL_DRAW_BUFFER15                  0x8834
  40.493 +#define GL_BLEND_EQUATION_ALPHA           0x883D
  40.494 +#define GL_MAX_VERTEX_ATTRIBS             0x8869
  40.495 +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
  40.496 +#define GL_MAX_TEXTURE_IMAGE_UNITS        0x8872
  40.497 +#define GL_FRAGMENT_SHADER                0x8B30
  40.498 +#define GL_VERTEX_SHADER                  0x8B31
  40.499 +#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
  40.500 +#define GL_MAX_VERTEX_UNIFORM_COMPONENTS  0x8B4A
  40.501 +#define GL_MAX_VARYING_FLOATS             0x8B4B
  40.502 +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
  40.503 +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
  40.504 +#define GL_SHADER_TYPE                    0x8B4F
  40.505 +#define GL_FLOAT_VEC2                     0x8B50
  40.506 +#define GL_FLOAT_VEC3                     0x8B51
  40.507 +#define GL_FLOAT_VEC4                     0x8B52
  40.508 +#define GL_INT_VEC2                       0x8B53
  40.509 +#define GL_INT_VEC3                       0x8B54
  40.510 +#define GL_INT_VEC4                       0x8B55
  40.511 +#define GL_BOOL                           0x8B56
  40.512 +#define GL_BOOL_VEC2                      0x8B57
  40.513 +#define GL_BOOL_VEC3                      0x8B58
  40.514 +#define GL_BOOL_VEC4                      0x8B59
  40.515 +#define GL_FLOAT_MAT2                     0x8B5A
  40.516 +#define GL_FLOAT_MAT3                     0x8B5B
  40.517 +#define GL_FLOAT_MAT4                     0x8B5C
  40.518 +#define GL_SAMPLER_1D                     0x8B5D
  40.519 +#define GL_SAMPLER_2D                     0x8B5E
  40.520 +#define GL_SAMPLER_3D                     0x8B5F
  40.521 +#define GL_SAMPLER_CUBE                   0x8B60
  40.522 +#define GL_SAMPLER_1D_SHADOW              0x8B61
  40.523 +#define GL_SAMPLER_2D_SHADOW              0x8B62
  40.524 +#define GL_DELETE_STATUS                  0x8B80
  40.525 +#define GL_COMPILE_STATUS                 0x8B81
  40.526 +#define GL_LINK_STATUS                    0x8B82
  40.527 +#define GL_VALIDATE_STATUS                0x8B83
  40.528 +#define GL_INFO_LOG_LENGTH                0x8B84
  40.529 +#define GL_ATTACHED_SHADERS               0x8B85
  40.530 +#define GL_ACTIVE_UNIFORMS                0x8B86
  40.531 +#define GL_ACTIVE_UNIFORM_MAX_LENGTH      0x8B87
  40.532 +#define GL_SHADER_SOURCE_LENGTH           0x8B88
  40.533 +#define GL_ACTIVE_ATTRIBUTES              0x8B89
  40.534 +#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH    0x8B8A
  40.535 +#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
  40.536 +#define GL_SHADING_LANGUAGE_VERSION       0x8B8C
  40.537 +#define GL_CURRENT_PROGRAM                0x8B8D
  40.538 +#define GL_POINT_SPRITE_COORD_ORIGIN      0x8CA0
  40.539 +#define GL_LOWER_LEFT                     0x8CA1
  40.540 +#define GL_UPPER_LEFT                     0x8CA2
  40.541 +#define GL_STENCIL_BACK_REF               0x8CA3
  40.542 +#define GL_STENCIL_BACK_VALUE_MASK        0x8CA4
  40.543 +#define GL_STENCIL_BACK_WRITEMASK         0x8CA5
  40.544 +#endif
  40.545 +
  40.546 +#ifndef GL_VERSION_2_0_DEPRECATED
  40.547 +#define GL_VERTEX_PROGRAM_TWO_SIDE        0x8643
  40.548 +#define GL_POINT_SPRITE                   0x8861
  40.549 +#define GL_COORD_REPLACE                  0x8862
  40.550 +#define GL_MAX_TEXTURE_COORDS             0x8871
  40.551 +#endif
  40.552 +
  40.553 +#ifndef GL_VERSION_2_1
  40.554 +#define GL_PIXEL_PACK_BUFFER              0x88EB