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

display_ggi.h

Go to the documentation of this file.
00001 /*
00002         $Id: display_ggi.h,v 1.2 2001/03/17 23:53:24 vaidhy 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_display_ggi
00016 #define header_display_ggi
00017 
00018 #ifdef USE_GGI
00019 
00020 #include "Display/Display/Generic/displaycard_generic.h"
00021 
00022 #include "target_ggi.h"
00023 
00024 #include <ggi/ggi.h>
00025 
00026 class CL_GGI_DisplayCard : public CL_DisplayCard_Generic
00027 {
00028 public:
00029         CL_GGI_DisplayCard(int card_no);
00030         virtual ~CL_GGI_DisplayCard();
00031         
00032         // CL_DisplayCard functions:
00033         // -------------------------
00034 
00035         virtual void flip_display(bool sync=false);
00036         virtual void put_display(const class CL_Rect &rect);
00037         virtual void set_palette(CL_Palette *palette);
00038         virtual CL_Palette *get_palette();
00039         virtual void set_videomode(int width, int height, int bpp, bool fullscreen, bool allow_resize, bool video_memory);
00040         virtual bool is_initialized();
00041         
00042         virtual std::string get_name() { return "GGI Display"; }
00043         virtual int get_total_memory() { return -1; }
00044         virtual const std::list<CL_VidMode*> &get_videomodes();
00045 
00046         virtual void clear_display(float red=0, float green=0, float blue=0, float alpha=1);
00047         virtual void fill_rect(int x1, int y1, int x2, int y2, float r, float g, float b, float a);
00048         virtual void draw_rect(int x1, int y1, int x2, int y2, float r, float g, float b, float a);
00049         virtual void draw_line(int x1, int y1, int x2, int y2, float r, float g, float b, float a);
00050         
00051         // CL_DisplayCard_Generic functions:
00052         // ---------------------------------
00053 
00054         virtual CL_Target *get_target() { return m_target; }
00055         virtual CL_Target *get_frontbuffer() { if (m_target2) return m_target2; else return m_target; }
00056 
00057         ggi_visual_t vis;
00058         ggi_mode mode;
00059 
00060 protected:
00061 #ifdef GGI_BLIT
00062         virtual CL_Blitters create_hw_blitters(CL_SurfaceProvider *provider);
00063 #endif GGI_BLIT
00064                 
00065 private:
00066         bool m_initialized;
00067         CL_Palette *m_palette;
00068         CL_Target_GGI *m_target;
00069         CL_Target_GGI *m_target2;
00070 };
00071 
00072 #endif /* USE_GGI */
00073 
00074 #endif

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