GFC Logo GFC Title Logo
Reference Manual
Main Page  |  Namespace List  |  Alphabetical List  |  Class List  |  File List

pixbuf-loader.hh

Go to the documentation of this file.
00001 /* GFC-UI: GTK+ Foundation Classes (User Interface Library) 00002 * Copyright (C) 2002-2004 The GFC 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 GFC_GDK_PIXBUF_LOADER_HH 00025 #define GFC_GDK_PIXBUF_LOADER_HH 00026 00027 #ifndef GFC_G_OBJECT_HH 00028 #include <gfc/glib/object.hh> 00029 #endif 00030 00031 #ifndef GDK_PIXBUF_H 00032 #include <gdk-pixbuf/gdk-pixbuf.h> 00033 #endif 00034 00035 #ifndef GDK_PIXBUF_LOADER_H 00036 #include <gdk-pixbuf/gdk-pixbuf-loader.h> 00037 #endif 00038 00039 namespace GFC { 00040 00041 namespace G { 00042 class Error; 00043 } 00044 00045 namespace Gdk { 00046 00047 class Pixbuf; 00048 class PixbufAnimation; 00049 class PixbufFormat; 00050 00082 00083 class PixbufLoader : public G::Object 00084 { 00085 friend class G::Object; 00086 00087 PixbufLoader(const PixbufLoader&); 00088 PixbufLoader& operator=(const PixbufLoader&); 00089 00090 protected: 00093 00094 explicit PixbufLoader(GdkPixbufLoader *pixbuf_loader, bool owns_reference = true); 00101 00105 00106 typedef G::Signal<void, int, int> SizePreparedSignalType; 00107 typedef G::SignalProxy<TypeInstance, SizePreparedSignalType> SizePreparedSignalProxy; 00108 static const SizePreparedSignalType size_prepared_signal; 00115 00116 typedef G::Signal<void> AreaPreparedSignalType; 00117 typedef G::SignalProxy<TypeInstance, AreaPreparedSignalType> AreaPreparedSignalProxy; 00118 static const AreaPreparedSignalType area_prepared_signal; 00123 00124 typedef G::Signal<void, int, int, int, int> AreaUpdatedSignalType; 00125 typedef G::SignalProxy<TypeInstance, AreaUpdatedSignalType> AreaUpdatedSignalProxy; 00126 static const AreaUpdatedSignalType area_updated_signal; 00135 00136 typedef G::Signal<void> ClosedSignalType; 00137 typedef G::SignalProxy<TypeInstance, ClosedSignalType> ClosedSignalProxy; 00138 static const ClosedSignalType closed_signal; 00143 00145 00146 public: 00149 00150 PixbufLoader(); 00152 00153 virtual ~PixbufLoader(); 00155 00157 00158 static Pointer<PixbufLoader> create_with_type(const char *image_type, G::Error *error = 0); 00159 static Pointer<PixbufLoader> create_with_type(const String& image_type, G::Error *error = 0); 00172 00173 static Pointer<PixbufLoader> create_with_mime_type(const char *mime_type, G::Error *error = 0); 00174 static Pointer<PixbufLoader> create_with_mime_type(const String& mime_type, G::Error *error = 0); 00185 00188 00189 GdkPixbufLoader* gdk_pixbuf_loader() const; 00191 00192 operator GdkPixbufLoader* () const; 00194 00195 Pointer<Pixbuf> get_pixbuf() const; 00208 00209 Pointer<PixbufAnimation> get_animation() const; 00218 00219 Pointer<PixbufFormat> get_format() const; 00222 00226 00227 void set_size(int width, int height); 00236 00237 bool write(const unsigned char *buffer, size_t count, G::Error *error); 00246 00247 bool close(G::Error *error = 0); 00260 00264 00265 const SizePreparedSignalProxy sig_size_prepared(); 00269 00270 const AreaPreparedSignalProxy sig_area_prepared(); 00273 00274 const AreaUpdatedSignalProxy sig_area_updated(); 00277 00278 const ClosedSignalProxy sig_closed(); 00280 00282 }; 00283 00284 } // namespace Gdk 00285 00286 } // namespace GFC 00287 00288 #include <gfc/gdk-pixbuf/inline/pixbuf-loader.inl> 00289 00290 #endif // GFC_GDK_PIXBUF_LOADER_HH 00291

Generated on Tue Aug 24 00:34:31 2004 for GFC-UI by doxygen 1.3.8