Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

input_keyboard.h

Go to the documentation of this file.
00001 /*
00002         $Id: input_keyboard.h,v 1.1 2001/03/06 15:09:22 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_input_keyboard
00016 #define header_input_keyboard
00017 
00018 #include "API/Display/Input/input.h"
00019 #include "API/Display/Input/inputbutton.h"
00020 #include "Core/System/Win32/init_win32.h"
00021 #include "API/Display/Input/keyboard.h"
00022 #include "API/Core/System/keep_alive.h"
00023 
00024 class CL_InputButton_Keyboard_Win32;
00025 
00026 class CL_Keyboard_Win32
00027 : public CL_Keyboard,
00028         public CL_KeepAlive,
00029         public CL_Win32EventListener
00030 {
00031 protected:
00032         unsigned char keys_down[256];
00033         CL_InputButton_Keyboard_Win32 **buttons;
00034 
00035         CL_InputButton *map_button(int key);
00036 
00037 public:
00038         CL_Keyboard_Win32();
00039         virtual ~CL_Keyboard_Win32();
00040 
00041         virtual char *get_name() const;
00042 
00043         virtual int get_num_buttons() const;
00044         virtual CL_InputButton *get_button(int button_num);
00045 
00046         virtual int get_num_axes() const;
00047         virtual CL_InputAxis *get_axis(int axis_num);
00048 
00049         virtual int get_num_hats() const;
00050         virtual CL_InputHat *get_hat(int hat_num);
00051 
00052         virtual int get_num_cursors() const;
00053         virtual CL_InputCursor *get_cursor(int cursor_num);
00054 
00055         virtual void keep_alive();
00056         virtual bool received_event(UINT uMsg, WPARAM wParam, LPARAM lParam);
00057 };
00058 
00059 class CL_InputButton_Keyboard_Win32 : public CL_InputButton
00060 {
00061 protected:
00062         int key;
00063         unsigned char *keys_down;
00064 
00065 public:
00066         CL_InputButton_Keyboard_Win32(int key, unsigned char *keys_down);
00067         virtual ~CL_InputButton_Keyboard_Win32();
00068 
00069         virtual bool is_pressed();
00070 };
00071 
00072 #endif

Generated at Wed Apr 4 19:54:00 2001 for ClanLib by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001