// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _GDKMM_PIXBUFLOADER_H
#define _GDKMM_PIXBUFLOADER_H

#include <glibmm.h>

/* $Id: pixbufloader.hg,v 1.8 2002/10/19 19:23:41 daniel Exp $ */

/* Copyright (C) 1998-2002 The gtkmm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <glibmm/object.h>
#include <gdkmm/pixbuf.h>
#include <gdkmm/pixbufanimation.h>


#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GdkPixbufLoader GdkPixbufLoader;
typedef struct _GdkPixbufLoaderClass GdkPixbufLoaderClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */


namespace Gdk
{ class PixbufLoader_Class; } // namespace Gdk
namespace Gdk
{


class PixbufLoader : public Glib::Object
{
  
#ifndef DOXYGEN_SHOULD_SKIP_THIS

public:
  typedef PixbufLoader CppObjectType;
  typedef PixbufLoader_Class CppClassType;
  typedef GdkPixbufLoader BaseObjectType;
  typedef GdkPixbufLoaderClass BaseClassType;

private:
  friend class PixbufLoader_Class;
  static CppClassType pixbufloader_class_;

  // noncopyable
  PixbufLoader(const PixbufLoader&);
  PixbufLoader& operator=(const PixbufLoader&);

protected:
  explicit PixbufLoader(const Glib::ConstructParams& construct_params);
  explicit PixbufLoader(GdkPixbufLoader* castitem);

#endif /* DOXYGEN_SHOULD_SKIP_THIS */

public:
  virtual ~PixbufLoader();

#ifndef DOXYGEN_SHOULD_SKIP_THIS
  static GType get_type()      G_GNUC_CONST;
  static GType get_base_type() G_GNUC_CONST;
#endif

  GdkPixbufLoader*       gobj()       { return reinterpret_cast<GdkPixbufLoader*>(gobject_); }
  const GdkPixbufLoader* gobj() const { return reinterpret_cast<GdkPixbufLoader*>(gobject_); }

  GdkPixbufLoader* gobj_copy();

private:

protected:

  PixbufLoader();

  /**
   * @throw Gdk::PixbufError
   */
  explicit PixbufLoader(const Glib::ustring& image_type);

public:
  
  static Glib::RefPtr<PixbufLoader> create();


  /**
   * @throw Gdk::PixbufError
   */
  
  static Glib::RefPtr<PixbufLoader> create(const Glib::ustring& image_type);


  /**
   * @throw Gdk::PixbufError
   * @throw Glib::FileError
   */
  void write(const guint8* buf, gsize count);

  /**
   * @throw Gdk::PixbufError
   * @throw Glib::FileError
   */
  void close();

  
  Glib::RefPtr<Gdk::Pixbuf> get_pixbuf();
  
  Glib::RefPtr<Gdk::PixbufAnimation> get_animation();

  
  /**
   * @par Prototype:
   * <tt>void %area_prepared()</tt>
   */
  Glib::SignalProxy0<void> signal_area_prepared();

  
  /**
   * @par Prototype:
   * <tt>void %area_updated(int x, int y, int width, int height)</tt>
   */
  Glib::SignalProxy4<void,int,int,int,int> signal_area_updated();

  
  /**
   * @par Prototype:
   * <tt>void %closed()</tt>
   */
  Glib::SignalProxy0<void> signal_closed();


public:

public:
  //C++ methods used to invoke GTK+ virtual functions:

protected:
  //GTK+ Virtual Functions (override these to change behaviour):

  //Default Signal Handlers::
  virtual void on_area_prepared();
  virtual void on_area_updated(int x, int y, int width, int height);
  virtual void on_closed();


};

} // namespace Gdk


namespace Glib
{
  /** @relates Gdk::PixbufLoader */
  Glib::RefPtr<Gdk::PixbufLoader> wrap(GdkPixbufLoader* object, bool take_copy = false);
}


#endif /* _GDKMM_PIXBUFLOADER_H */

