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

mouse_be.h

Go to the documentation of this file.
00001 /*
00002         $Id: mouse_be.h,v 1.1 2001/03/06 15:09:20 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_mouse_ggi
00016 #define header_mouse_ggi
00017 
00018 #ifdef USE_GGI
00019 
00020 #include "API/Display/Input/inputdevice.h"
00021 #include "API/Display/Input/inputbutton.h"
00022 #include "API/Display/Input/inputcursor.h"
00023 #include "Display/Display/GGI/display_ggi.h"
00024 #include "Core/System/Unix/init_linux.h"
00025 
00026 class CL_InputButton_Mouse_GGI : public CL_InputButton
00027 {
00028 public:
00029         bool button_state;
00030 
00031         CL_InputButton_Mouse_GGI();
00032         virtual ~CL_InputButton_Mouse_GGI();
00033 
00034         virtual bool is_pressed();
00035 };
00036 
00037 class CL_InputCursor_Mouse_GGI : public CL_InputCursor
00038 {
00039 protected:
00040         CL_GGI_DisplayCard *card;
00041 public:
00042         float x, y;
00043 
00044         CL_InputCursor_Mouse_GGI(CL_GGI_DisplayCard *card);
00045         virtual ~CL_InputCursor_Mouse_GGI();
00046 
00047         virtual float get_x();
00048         virtual float get_y();
00049         virtual float get_max_x();
00050         virtual float get_max_y();
00051 };
00052 
00053 class CL_Mouse_GGI : public CL_InputDevice, CL_System_KeepAlive
00054 {
00055 protected:
00056         CL_GGI_DisplayCard *card;
00057         CL_Array<CL_InputButton_Mouse_GGI> buttons;
00058         CL_InputCursor_Mouse_GGI *cursor;
00059         ggi_visual_t m_vis;
00060 
00061 public:
00062         CL_Mouse_GGI(CL_GGI_DisplayCard *card);
00063         virtual ~CL_Mouse_GGI();
00064 
00065         virtual char *get_name() const { return "ggiMouse"; };
00066 
00067         virtual int get_num_buttons() const;
00068         virtual CL_InputButton *get_button(int button_num);
00069 
00070         virtual int get_num_axes() const;
00071         virtual CL_InputAxis *get_axis(int axis_num);
00072 
00073         virtual int get_num_hats() const;
00074         virtual CL_InputHat *get_hat(int hat_num);
00075 
00076         virtual int get_num_buffers() const;
00077         virtual CL_InputBuffer *get_buffer(int buffer_num);
00078 
00079         virtual int get_num_cursors() const;
00080         virtual CL_InputCursor *get_cursor(int cursor_num);
00081 
00082         virtual bool keep_alive();
00083 };
00084 
00085 #endif /* USE_GGI */
00086 
00087 #endif

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