// -*- c++ -*-
//  Generated by gtkmmproc from ./../image.gen_h -- DO NOT MODIFY!
#include <gtk--/image.h>
#include <gtk--/private/image_p.h>
namespace Gtk
{

Image::Image(const Gdk_Image &val, const Gdk_Bitmap &mask)
  :    Misc((GtkMisc*)(gtk_object_new(get_type(),0)))
{
  initialize_class();
  GtkImage *image;

  //if (val==NULL) return;
  g_return_if_fail (val.connected());

  image = (GtkImage*)gtkobject;

  gtk_image_set (image, gdk_const_cast(val),
                        gdk_const_cast(mask));

}

void
Image::get(Gdk_Image &val, Gdk_Bitmap &mask) const
{ GdkImage *im;
  GdkBitmap *bm;
  gtk_image_get(const_cast<GtkImage*>(gtkobj()), &im, &bm);
  val.assign(im);
  mask=bm;
}
}

namespace Gtk {
Gtk::Image *wrap (GtkImage *o)
  {
    return static_cast<Gtk::Image *> (Gtk::wrap_auto ((GtkObject *) (o)));
  }
}

namespace Gtk {
Image_Class Image::image_class = {0};

Object* Image_Class::wrap_new(GtkObject* o)
  {
    Object* cpp=manage(new Image((GtkImage*)(o)));
    return cpp;
  }

bool Image::isA( Object *checkcast)
  {
    return GTK_IS_IMAGE(checkcast->gtkobj());
  }

GtkType Image::get_type()
  {
    return image_class.get_type();
  }

GtkType Image_Class::get_type()
  {
    if (!type)
      {
        CppClassParent::CppObjectType::get_type();
        GtkTypeInfo info =
          {
            "Gtk__Image",
            sizeof(BaseObjectType),
            sizeof(BaseClassType),
            (GtkClassInitFunc) class_init_function,
            (GtkObjectInitFunc) object_init_function,
            /* reserved_1 */ NULL,
            /* reserved_2 */ NULL,
            /*base_class_init_func */ (GtkClassInitFunc) NULL
          };
        type=gtk_type_unique(gtk_image_get_type(), &info);
      }
    return type;
  }

const char* const Image::signal_names[]={
   0};

void Image::initialize_class()
  {

  }

void Image_Class::class_init_function(GtkImageClass *klass)
  {
    CppClassParent::class_init_function((BaseClassParent*)klass);
  }

void Image_Class::object_init_function(GtkImage *)
  {}

}

Gtk::Image::Image(GtkImage *castitem)
  :     Gtk::Misc((GtkMisc*)(castitem))
  {
    initialize_class();
  }

Gtk::Image::~Image() { destroy_(); }

void Gtk::Image::set(const Gdk_Image& val,const Gdk_Bitmap& mask)
  {
    gtk_image_set(gtkobj(),const_cast<GdkImage*>(val.gdkobj()),const_cast<GdkBitmap*>(mask.gdkobj()));
  }
