Reference Manual
Inti Logo
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

image.h

Go to the documentation of this file.
00001 /*  Inti: Integrated Foundation Classes
00002  *  Copyright (C) 2002-2003 The Inti Development Team.
00003  *
00004  *  This program is free software; you can redistribute it and/or modify
00005  *  it under the terms of the GNU General Public License as published by
00006  *  the Free Software Foundation; either version 2 of the License, or
00007  *  (at your option) any later version.
00008  *
00009  *  This program is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *  GNU Library General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU Library General Public License
00015  *  along with this program; if not, write to the Free Software
00016  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00017  */
00018  
00023 
00024 #ifndef INTI_GDK_IMAGE_H
00025 #define INTI_GDK_IMAGE_H
00026 
00027 #ifndef INTI_GDK_TYPES_H
00028 #include <inti/gdk/types.h>
00029 #endif
00030 
00031 #ifndef INTI_G_OBJECT_H
00032 #include <inti/glib/object.h>
00033 #endif
00034 
00035 namespace Inti {
00036 
00037 namespace Gdk {
00038         
00039 class Colormap;
00040 class Drawable;
00041 class ImageClass;
00042 class Pixbuf;
00043 class Visual;
00044 
00045 // @enum Gdk::ImageType
00047 
00048 enum ImageType
00049 {
00050         IMAGE_NORMAL = GDK_IMAGE_NORMAL,
00053         
00054         IMAGE_SHARED = GDK_IMAGE_SHARED,
00059 
00060         IMAGE_FASTEST = GDK_IMAGE_FASTEST
00063 };
00064 
00075 
00076 class Image : public G::Object
00077 {
00078         friend class G::Object;
00079         friend class ImageClass;
00080 
00081         Image(const Image&);
00082         Image& operator=(const Image&);
00083 
00084 protected:
00087 
00088         explicit Image(GdkImage *image, bool reference = true);
00095 
00097 
00098 public:
00101 
00102         virtual ~Image();
00104 
00106 
00107         static Pointer<Image> create(ImageType type, const Visual& visual, int width, int height);
00117 
00120 
00121         GdkImage* gdk_image() const { return (GdkImage*)instance; }
00123 
00124         GdkImageClass* gdk_image_class() const;
00126 
00127         operator GdkImage* () const;
00129 
00130         ImageType image_type() const;
00132 
00133         const Visual& visual() const;
00135 
00136         ByteOrder byte_order() const;
00138 
00139         int width() const;
00141 
00142         int height() const;
00144 
00145         unsigned short depth() const;
00147 
00148         unsigned short bytes_per_pixel() const;
00150         
00151         unsigned short bytes_per_line() const;
00153 
00154         unsigned int get_pixel(int x, int y) const;
00159 
00160         Colormap* get_colormap() const;
00166         
00170 
00171         void put_pixel(int x, int y, unsigned int pixel);
00176 
00177         void set_colormap(Colormap& colormap);
00184 
00186 };
00187 
00188 } // namespace Gdk
00189 
00190 } // namespace Inti
00191 
00192 #endif // INTI_GDK_IMAGE_H
00193 
Main Page - Footer


Generated on Sun Sep 14 20:08:03 2003 for Inti by doxygen 1.3.2 written by Dimitri van Heesch, © 1997-2002