00001 /* 00002 $Id: input.h,v 1.2 2001/03/15 12:14:46 mbn Exp $ 00003 00004 ------------------------------------------------------------------------ 00005 ClanLib, the platform independent game SDK. 00006 00007 This library is distributed under the GNU LIBRARY GENERAL PUBLIC LICENSE 00008 version 2. See COPYING for details. 00009 00010 For a total list of contributers see CREDITS. 00011 00012 ------------------------------------------------------------------------ 00013 */ 00014 00016 00017 #ifndef header_input 00018 #define header_input 00019 00020 #include <vector> 00021 #include "../../signals.h" 00022 00023 #include "key.h" 00024 00025 class CL_InputDevice; 00026 class CL_Keyboard; 00027 00028 class CL_Input 00029 //: Input component class. 00030 // CL_Input is the access point to keyboards, joysticks and (mouse) pointers. 00031 { 00032 public: 00033 virtual ~CL_Input() { return; } 00034 00035 static std::vector<CL_Keyboard *> keyboards; 00036 //: List of keyboards available. 00037 00038 static std::vector<CL_InputDevice *> joysticks; // joysticks and gamepads 00039 //: List of joysticks and gamepads available. 00040 00041 static std::vector<CL_InputDevice *> pointers; // mice and digitizers 00042 //: List of mice and digitizers available. 00043 00044 static CL_Signal_v2<CL_InputDevice *, const CL_Key &> sig_button_press; 00045 //: Signal signaled upon button press. 00046 //Sends int x, int y to the slot sig_button_press points to. 00047 00048 static CL_Signal_v2<CL_InputDevice *, const CL_Key &> sig_button_release; 00049 //: Signal signaled upon button release. 00050 //Sends int x, int y to the slot sig_button_release points to. 00051 00052 static CL_Signal_v3<CL_InputDevice *, int, int> sig_mouse_move; 00053 //: Signal signaled upen mouse move. 00054 }; 00055 00056 #endif
1.2.6 written by Dimitri van Heesch,
© 1997-2001