CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

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 
00039 #define CS_MAX_MOUSE_BUTTONS    10
00040 
00041 #define CS_MAX_JOYSTICK_COUNT   2
00042 
00043 #define CS_MAX_JOYSTICK_BUTTONS 10
00044 
00045 SCF_VERSION(iKeyboardDriver, 0, 0, 1);
00046 
00054 struct iKeyboardDriver : public iBase
00055 {
00060   virtual void Reset () = 0;
00061 
00063   virtual void DoKey (int iKey, int iChar, bool iDown) = 0;
00064 
00070   virtual bool GetKeyState (int iKey) = 0;
00071 };
00072 
00073 SCF_VERSION(iMouseDriver, 0, 0, 1);
00074 
00082 struct iMouseDriver : public iBase
00083 {
00085   virtual void SetDoubleClickTime (int iTime, size_t iDist) = 0;
00086 
00091   virtual void Reset () = 0;
00092 
00094   virtual int GetLastX () = 0;
00096   virtual int GetLastY () = 0;
00098   virtual bool GetLastButton (int button) = 0;
00099 
00101   virtual void DoButton (int button, bool down, int x, int y) = 0;
00103   virtual void DoMotion (int x, int y) = 0;
00104 };
00105 
00106 SCF_VERSION(iJoystickDriver, 0, 0, 1);
00107 
00115 struct iJoystickDriver : public iBase
00116 {
00121   virtual void Reset () = 0;
00122 
00124   virtual int GetLastX (int number) = 0;
00126   virtual int GetLastY (int number) = 0;
00128   virtual bool GetLastButton (int number, int button) = 0;
00129 
00131   virtual void DoButton (int number, int button, bool down, int x, int y) = 0;
00133   virtual void DoMotion (int number, int x, int y) = 0;
00134 };
00135 
00138 #endif // __CS_IUTIL_STDINPUT_H__

Generated for Crystal Space by doxygen 1.2.14