Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages
csinput.h
Go to the documentation of this file.00001 /* 00002 Crystal Space input library 00003 Copyright (C) 1998,2000 by Jorrit Tyberghein 00004 Written by Andrew Zabolotny <bit@eltech.ru> 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License as published by the Free Software Foundation; either 00009 version 2 of the License, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public 00017 License along with this library; if not, write to the Free 00018 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00019 */ 00020 00021 #ifndef __CS_IUTIL_STDINPUT_H__ 00022 #define __CS_IUTIL_STDINPUT_H__ 00023 00036 #include "csutil/scf.h" 00037 #include "iutil/event.h" 00038 #include "csutil/csunicode.h" 00039 00043 enum csKeyComposeResult 00044 { 00046 csComposeNoChar = -1, 00048 csComposeNormalChar, 00050 csComposeComposedChar, 00055 csComposeUncomposeable 00056 }; 00057 00058 SCF_VERSION(iKeyComposer, 0, 0, 1); 00059 00063 struct iKeyComposer : public iBase 00064 { 00079 virtual csKeyComposeResult HandleKey (const csKeyEventData& keyEventData, 00080 utf32_char* buf, size_t bufChars, int* resultChars = 0) = 0; 00086 virtual void ResetState () = 0; 00087 }; 00088 00089 SCF_VERSION(iKeyboardDriver, 0, 0, 2); 00090 00116 struct iKeyboardDriver : public iBase 00117 { 00122 virtual void Reset () = 0; 00123 00134 virtual void DoKey (utf32_char codeRaw, utf32_char codeCooked, bool iDown, 00135 bool autoRepeat = false, csKeyCharType charType = csKeyCharTypeNormal) = 0; 00136 00141 virtual bool GetKeyState (utf32_char codeRaw) const = 0; 00142 00146 virtual uint32 GetModifierState (utf32_char codeRaw) const = 0; 00147 00154 virtual csPtr<iKeyComposer> CreateKeyComposer () = 0; 00155 00160 virtual csEventError SynthesizeCooked (iEvent *) = 0; 00161 }; 00162 00163 SCF_VERSION(iMouseDriver, 0, 0, 1); 00164 00186 struct iMouseDriver : public iBase 00187 { 00189 virtual void SetDoubleClickTime (int iTime, size_t iDist) = 0; 00190 00195 virtual void Reset () = 0; 00196 00198 virtual int GetLastX (uint number = 1) const = 0; 00200 virtual int GetLastY (uint number = 1) const = 0; 00202 virtual int GetLast (uint n, uint a) const = 0; 00204 virtual const int32 *GetLast (uint n) const = 0; 00206 virtual bool GetLastButton (uint number, uint button) const = 0; 00207 virtual bool GetLastButton (uint button) const = 0; 00208 00213 virtual void DoButton (uint number, uint button, bool down, 00214 const int32 *axes, uint numAxes) = 0; 00215 virtual void DoButton (uint button, bool down, int x, int y) = 0; 00217 virtual void DoMotion (uint number, const int32 *axes, uint numAxes) = 0; 00218 virtual void DoMotion (int x, int y) = 0; 00219 }; 00220 00221 SCF_VERSION(iJoystickDriver, 0, 0, 1); 00222 00242 struct iJoystickDriver : public iBase 00243 { 00248 virtual void Reset () = 0; 00249 00251 CS_DEPRECATED_METHOD virtual int GetLastX (uint number) const = 0; 00253 CS_DEPRECATED_METHOD virtual int GetLastY (uint number) const = 0; 00255 virtual const int32 *GetLast (uint number) const = 0; 00257 virtual int GetLast (uint number, uint axis) const = 0; 00258 00263 virtual bool GetLastButton (uint number, uint button) const = 0; 00264 00269 virtual void DoButton (uint number, uint button, bool down, 00270 const int32 *axes, uint numAxes) = 0; 00272 virtual void DoMotion (uint number, const int32 *axes, uint nunmAxes) = 0; 00273 }; 00274 00277 #endif // __CS_IUTIL_STDINPUT_H__
Generated for Crystal Space by doxygen 1.4.4