00001 /* 00002 Gel2D Game Engine - Cross-platform 2D gaming middleware 00003 Copyright (C) 2010-2011 Mark D. Procarione 00004 00005 Gel2D is free software: you can redistribute it and/or modify 00006 it under the terms of the GNU General Public License as published by 00007 the Free Software Foundation, either version 3 of the License, or 00008 (at your option) any later version. 00009 00010 Gel2D is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU General Public License for more details. 00014 */ 00015 00016 #ifndef __GELINPUT_H__ 00017 #define __GELINPUT_H__ 00018 00019 #include "gelNamespace.h" 00020 #include "gelVector.h" 00021 #include "gelSize.h" 00022 00023 namespace gel 00024 { 00027 00028 class GelInput 00029 { 00030 public: 00032 00034 static KeyState getKeyState( Key key ); 00035 00037 00039 static bool keyPressed( Key key ); 00040 00042 00044 static bool keyReleased( Key key ); 00045 00047 00049 static KeyState getMouseButton( MouseBtn button ); 00050 00052 00054 static bool mouseBtnPressed( MouseBtn button ); 00055 00057 00059 static bool mouseBtnReleased( MouseBtn button ); 00060 00062 00067 static int getMouseWheel(); 00068 00070 00071 static void setMouseWheel( int pos ); 00072 00074 00076 static void setCursorPos( int x, int y ); 00077 00079 00081 static void getCursorPos( int *x, int *y ); 00082 00084 00085 static GelPoint getCursorPos(); 00086 00088 00089 static int getCursorX(); 00090 00092 00093 static int getCursorY(); 00094 00096 00097 static void showCursor( int mode ); 00098 00100 00103 static void setCursor( const char *filename ); 00104 00106 00108 static void setCursor( SysCursorShape shape ); 00109 00111 00114 static int getJoystickBtn( int joystick, int button ); 00115 00117 00120 static float getJoystickAxis( int joystick, int axis ); 00121 00123 00126 static int getJoyHatPos( int joystick, int hat ); 00127 00129 00130 static int getJoystickCount(); 00131 00132 static Gel2dVec mouseToWorld(); 00133 }; 00135 } 00136 00137 #endif // __GELINPUT_H__
API Documentation by Mark D. Procarione | Generated by |