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

Preview::Preview(GtkPreviewType typex)
  :    Widget((GtkWidget*)(gtk_object_new(get_type(),0)))
{
  initialize_class();
  GtkPreview *preview;

  preview = (GtkPreview*)gtkobject;
  preview->type = typex;

  if (typex == GTK_PREVIEW_COLOR)
    preview->bpp = 3;
  else
    preview->bpp = 1;

  preview->dither = GDK_RGB_DITHER_NORMAL;
}


void
Preview::put(Gdk_Window &window, Gdk_GC &gc,
		 gint srcx, gint srcy, gint destx,
		 gint desty, gint widthx, gint heightx)
{
  gtk_preview_put(gtkobj(), window, gc, srcx, srcy, destx,
		  desty, widthx, heightx);
}


Gdk_Visual
Preview::get_visual()
{
  return gtk_preview_get_visual();
}

Gdk_Colormap
Preview::get_cmap()
{
  return gtk_preview_get_cmap();
}

GtkPreviewInfo *
Preview::get_info()
{
  return gtk_preview_get_info();
}

}

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

namespace Gtk {
Preview_Class Preview::preview_class = {0};

Object* Preview_Class::wrap_new(GtkObject* o)
  {
    Object* cpp=manage(new Preview((GtkPreview*)(o)));
    return cpp;
  }

bool Preview::isA( Object *checkcast)
  {
    return GTK_IS_PREVIEW(checkcast->gtkobj());
  }

GtkType Preview::get_type()
  {
    return preview_class.get_type();
  }

GtkType Preview_Class::get_type()
  {
    if (!type)
      {
        CppClassParent::CppObjectType::get_type();
        GtkTypeInfo info =
          {
            "Gtk__Preview",
            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_preview_get_type(), &info);
      }
    return type;
  }

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

void Preview::initialize_class()
  {

  }

void Preview_Class::class_init_function(GtkPreviewClass *klass)
  {
    CppClassParent::class_init_function((BaseClassParent*)klass);
  }

void Preview_Class::object_init_function(GtkPreview *)
  {}

}

Gtk::Preview::Preview(GtkPreview *castitem)
  :     Gtk::Widget((GtkWidget*)(castitem))
  {
    initialize_class();
  }

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

void Gtk::Preview::size(gint width,gint height)
  {
    gtk_preview_size(gtkobj(),width,height);
  }

void Gtk::Preview::draw_row(const guchar* data,gint x,gint y,gint w)
  {
    gtk_preview_draw_row(gtkobj(),const_cast<guchar*>(data),x,y,w);
  }

void Gtk::Preview::set_expand(bool expand)
  {
    gtk_preview_set_expand(gtkobj(),expand);
  }

void Gtk::Preview::set_gamma(double gamma)
  {
    gtk_preview_set_gamma(gamma);
  }

void Gtk::Preview::set_color_cube(guint nred_shades,guint ngreen_shades,guint nblue_shades,guint ngray_shades)
  {
    gtk_preview_set_color_cube(nred_shades,ngreen_shades,nblue_shades,ngray_shades);
  }

void Gtk::Preview::set_install_cmap(bool install_cmap)
  {
    gtk_preview_set_install_cmap(install_cmap);
  }

void Gtk::Preview::set_reserved(gint nreserved)
  {
    gtk_preview_set_reserved(nreserved);
  }

void Gtk::Preview::reset()
  {
    gtk_preview_reset();
  }

void Gtk::Preview::uninit()
  {
    gtk_preview_uninit();
  }

void Gtk::Preview::set_dither(GdkRgbDither dither)
  {
    gtk_preview_set_dither(gtkobj(),dither);
  }
