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

inputdevice.h

Go to the documentation of this file.
00001 /*
00002         $Id: inputdevice.h,v 1.1 2001/03/06 15:09:11 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_inputdevice
00018 #define header_inputdevice
00019 
00020 class CL_InputButton;
00021 class CL_InputAxis;
00022 class CL_InputHat;
00023 class CL_InputBuffer;
00024 class CL_InputCursor;
00025 
00026 class CL_InputDevice
00027 //: Input device interface.
00028 // Class interface representing an input device, such as a keyboard, mouse,
00029 // joystick, gamepad or digitizer.
00030 {
00031 public:
00032         virtual ~CL_InputDevice() { return; }
00033 
00034         virtual char *get_name() const =0;
00035         //: Returns the name of the input device.
00037 
00038         virtual int get_num_buttons() const =0;
00039         //: Returns the number of buttons on this device.
00041 
00042         virtual CL_InputButton *get_button(int button_num)=0;
00043         //: Returns a input button interface used to access the specified button number. 
00044         //: NULL is returned if button doesn't exist.
00047 
00048         virtual int get_num_axes() const =0;
00049         //: Returns the number of axes on this device.
00051 
00052         virtual CL_InputAxis *get_axis(int axis_num)=0;
00053         //: Returns a input axis interface used to access the specified axis number. 
00054         //: NULL is returned if axis doesn't exist.
00057 
00058         virtual int get_num_hats() const =0;
00059         //: Returns the number of hats available on this device.
00061         
00062         virtual CL_InputHat *get_hat(int hat_num)=0;
00063         //: Returns a input hat interface used to access the specified hat number. 
00064         //: NULL is returned if the hat doesn't exist.
00067 
00068         virtual int get_num_cursors() const =0;
00069         //: Returns the number of input cursors available on this device.
00071 
00072         virtual CL_InputCursor *get_cursor(int cursor_num)=0;
00073         //: Returns a input cursor interface used to access the specified cursor 
00074         //: number. NULL is returned if the cursor doesn't exist.
00077 };
00078 
00079 #endif

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