00001 /* 00002 $Id: keyboard_svgalib.h,v 1.1 2001/03/06 15:09:21 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 00015 #ifndef header_keyboard_svgalib 00016 #define header_keyboard_svgalib 00017 00018 #ifdef USE_SVGALIB 00019 00020 #include "API/Display/Input/input.h" 00021 #include "API/Display/Input/inputbutton.h" 00022 #include "API/Display/Input/keyboard.h" 00023 00024 class CL_InputButton_SVGAKeyboard : public CL_InputButton 00025 { 00026 protected: 00027 int key; 00028 00029 public: 00030 CL_InputButton_SVGAKeyboard(int _key); 00031 virtual bool is_pressed(); 00032 }; 00033 00034 class CL_SVGAKeyboard : public CL_Keyboard 00035 { 00036 protected: 00037 CL_Array<CL_InputButton_SVGAKeyboard> buttons; 00038 00039 public: 00040 CL_SVGAKeyboard(); 00041 virtual ~CL_SVGAKeyboard(); 00042 00043 // CL_Input and CL_Keyboard: 00044 virtual char *get_name(); 00045 00046 virtual int get_num_buttons(); 00047 virtual CL_InputButton *get_button(int button_num); 00048 00049 virtual int get_num_axes(); 00050 virtual CL_InputAxis *get_axis(int axis_num); 00051 00052 virtual int get_num_hats(); 00053 virtual CL_InputHat *get_hat(int hat_num); 00054 00055 virtual int get_num_cursors(); 00056 virtual CL_InputCursor *get_cursor(int cursor_num); 00057 }; 00058 00059 #endif 00060 00061 #endif
1.2.6 written by Dimitri van Heesch,
© 1997-2001