Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

csinput.h

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 __IUTIL_STDINPUT_H__
00022 #define __IUTIL_STDINPUT_H__
00023 
00031 #include "csutil/scf.h"
00032 
00034 #define CS_MAX_MOUSE_BUTTONS    10
00035 
00036 #define CS_MAX_JOYSTICK_COUNT   2
00037 
00038 #define CS_MAX_JOYSTICK_BUTTONS 10
00039 
00040 SCF_VERSION(iKeyboardDriver, 0, 0, 1);
00041 
00049 struct iKeyboardDriver : public iBase
00050 {
00055   virtual void Reset () = 0;
00056 
00058   virtual void DoKey (int iKey, int iChar, bool iDown) = 0;
00059 
00065   virtual bool GetKeyState (int iKey) = 0;
00066 };
00067 
00068 SCF_VERSION(iMouseDriver, 0, 0, 1);
00069 
00077 struct iMouseDriver : public iBase
00078 {
00080   virtual void SetDoubleClickTime (int iTime, size_t iDist) = 0;
00081 
00086   virtual void Reset () = 0;
00087 
00089   virtual int GetLastX () = 0;
00091   virtual int GetLastY () = 0;
00093   virtual bool GetLastButton (int button) = 0;
00094 
00096   virtual void DoButton (int button, bool down, int x, int y) = 0;
00098   virtual void DoMotion (int x, int y) = 0;
00099 };
00100 
00101 SCF_VERSION(iJoystickDriver, 0, 0, 1);
00102 
00110 struct iJoystickDriver : public iBase
00111 {
00116   virtual void Reset () = 0;
00117 
00119   virtual int GetLastX (int number) = 0;
00121   virtual int GetLastY (int number) = 0;
00123   virtual bool GetLastButton (int number, int button) = 0;
00124 
00126   virtual void DoButton (int number, int button, bool down, int x, int y) = 0;
00128   virtual void DoMotion (int number, int x, int y) = 0;
00129 };
00130 
00131 #endif // __IUTIL_STDINPUT_H__

Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000