00001 /*--------------------------------------------------------------------------------- 00002 00003 key input code -- provides slightly higher level input forming 00004 00005 Copyright (C) 2005 00006 Michael Noland (joat) 00007 Jason Rogers (dovoto) 00008 Christian Auby (DesktopMan) 00009 Dave Murphy (WinterMute) 00010 00011 This software is provided 'as-is', without any express or implied 00012 warranty. In no event will the authors be held liable for any 00013 damages arising from the use of this software. 00014 00015 Permission is granted to anyone to use this software for any 00016 purpose, including commercial applications, and to alter it and 00017 redistribute it freely, subject to the following restrictions: 00018 00019 1. The origin of this software must not be misrepresented; you 00020 must not claim that you wrote the original software. If you use 00021 this software in a product, an acknowledgment in the product 00022 documentation would be appreciated but is not required. 00023 2. Altered source versions must be plainly marked as such, and 00024 must not be misrepresented as being the original software. 00025 3. This notice may not be removed or altered from any source 00026 distribution. 00027 00028 00029 ---------------------------------------------------------------------------------*/ 00031 00034 //--------------------------------------------------------------------------------- 00035 #ifndef INPUT_HEADER_INCLUDE 00036 #define INPUT_HEADER_INCLUDE 00037 //--------------------------------------------------------------------------------- 00038 #include <nds/touch.h> 00039 #include <nds/input.h> 00040 00041 #ifdef __cplusplus 00042 extern "C" { 00043 #endif 00044 00046 00048 void scanKeys(void); 00049 00051 00053 uint32 keysCurrent(void); 00054 00056 uint32 keysHeld(void); 00057 00059 uint32 keysDown(void); 00060 00062 uint32 keysDownRepeat(void); 00063 00065 00068 void keysSetRepeat( u8 setDelay, u8 setRepeat ); 00069 00071 uint32 keysUp(void); 00072 00073 00074 00075 __attribute__ ((deprecated)) touchPosition touchReadXY() ; 00076 00077 00082 void touchRead(touchPosition *data); 00083 00084 #ifdef __cplusplus 00085 } 00086 #endif 00087 00088 //--------------------------------------------------------------------------------- 00089 #endif // INPUT_HEADER_INCLUDE 00090 //---------------------------------------------------------------------------------