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

target_ximage_std.h

Go to the documentation of this file.
00001 /*
00002         $Id: target_ximage_std.h,v 1.1 2001/03/06 15:09:19 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_target_ximage_std
00016 #define header_target_ximage_std
00017 
00018 #ifdef USE_X11
00019 
00020 #include "target_ximage.h"
00021 
00022 class CL_Target_XImage_Std : public CL_Target_XImage
00023 {
00024 public:
00025         CL_Target_XImage_Std(
00026                 XVisualInfo visual_info,
00027                 Display *dpy,
00028                 unsigned int width,
00029                 unsigned int height);
00030 
00031         CL_Target_XImage_Std(
00032                 XVisualInfo visual_info,
00033                 Display *dpy,
00034                 unsigned int width,
00035                 unsigned int height,
00036                 XImage *image,
00037                 bool delete_ximage);
00038                 
00039         virtual ~CL_Target_XImage_Std();
00040 
00041         virtual void lock();
00042         virtual void unlock();
00043 
00044         virtual void *get_data() const;
00045 
00046         virtual unsigned int get_width() const;
00047         virtual unsigned int get_height() const;
00048         virtual unsigned int get_pitch() const;
00049         
00050         virtual unsigned int get_depth() const;
00051         virtual unsigned int get_red_mask() const;
00052         virtual unsigned int get_green_mask() const;
00053         virtual unsigned int get_blue_mask() const;
00054         virtual unsigned int get_alpha_mask() const;
00055         virtual unsigned int get_num_frames() const { return 1; }
00056         virtual bool is_indexed() const;
00057 
00058         virtual CL_Palette *get_palette() const;
00059         
00060         virtual void put_image(int x, int y, Drawable win, GC gc);
00061         virtual void put_image(int x, int y, const class CL_Rect &rect, Drawable win, GC gc);
00062         
00063 protected:
00064         XVisualInfo m_visual_info;
00065         Display *m_dpy;
00066         
00067         unsigned int m_width;
00068         unsigned int m_height;
00069         unsigned int m_depth, m_pitch;
00070 
00071         XImage *m_std_image;
00072         
00073         bool m_delete_ximage;
00074 };
00075 
00076 #endif /*USE_X11*/
00077 
00078 #endif

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