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

Window::Window(GtkWindowType typex)
  :Bin((GtkBin*)(gtk_object_new(get_type(),0))),
   accel_group_(0)
{
  initialize_class();
  gtkobj()->type=typex;
}

Window::Window(GtkWindow *castitem)
  :Bin((GtkBin*)(castitem)),
   accel_group_(0)
{
  initialize_class();
}

Window::~Window()
{
  if (is_visible()) hide(); // we are going to try to die anyway
}

AccelGroup* Window::get_accel_group()
{
  if (!accel_group_)
    {
      GtkAccelGroup *accel=gtk_accel_group_new();
      gtk_window_add_accel_group(gtkobj(),accel);
      accel_group_=wrap(accel);
    }
  return accel_group_;
}

} /* namespace Gtk */

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

namespace Gtk {
Window_Class Window::window_class = {0};

Object* Window_Class::wrap_new(GtkObject* o)
  {
    Object* cpp=manage(new Window((GtkWindow*)(o)));
    return cpp;
  }

bool Window::isA( Object *checkcast)
  {
    return GTK_IS_WINDOW(checkcast->gtkobj());
  }

GtkType Window::get_type()
  {
    return window_class.get_type();
  }

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

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

void Window::initialize_class()
  {

  }

void Window_Class::class_init_function(GtkWindowClass *klass)
  {
    CppClassParent::class_init_function((BaseClassParent*)klass);
  }

void Window_Class::object_init_function(GtkWindow *)
  {}

}

void Gtk::Window::set_title(const nstring& title)
  {
    gtk_window_set_title(gtkobj(),title.gc_str());
  }

void Gtk::Window::set_wmclass(const nstring& wmclass_name,const nstring& wmclass_class)
  {
    gtk_window_set_wmclass(gtkobj(),wmclass_name.gc_str(),wmclass_class.gc_str());
  }

void Gtk::Window::set_policy(gint allow_shrink,gint allow_grow,gint auto_shrink)
  {
    gtk_window_set_policy(gtkobj(),allow_shrink,allow_grow,auto_shrink);
  }

void Gtk::Window::set_position(GtkWindowPosition position)
  {
    gtk_window_set_position(gtkobj(),position);
  }

gint Gtk::Window::activate_focus()
  {
    return gtk_window_activate_focus(gtkobj());
  }

gint Gtk::Window::activate_default()
  {
    return gtk_window_activate_default(gtkobj());
  }

void Gtk::Window::set_transient_for(Gtk::Window& parent)
  {
    gtk_window_set_transient_for(gtkobj(),parent.gtkobj());
  }

void Gtk::Window::set_geometry_hints(Gtk::Widget& geometry_widget,GdkGeometry* geometry,GdkWindowHints geom_mask)
  {
    gtk_window_set_geometry_hints(gtkobj(),geometry_widget.gtkobj(),geometry,geom_mask);
  }

void Gtk::Window::set_default_size(gint width,gint height)
  {
    gtk_window_set_default_size(gtkobj(),width,height);
  }

void Gtk::Window::set_modal(bool modal)
  {
    gtk_window_set_modal(gtkobj(),(gboolean)modal);
  }

void Gtk::Window::add_accel_group(Gtk::AccelGroup& accel_group)
  {
    gtk_window_add_accel_group(gtkobj(),accel_group.gtkobj());
  }

void Gtk::Window::remove_accel_group(Gtk::AccelGroup& accel_group)
  {
    gtk_window_remove_accel_group(gtkobj(),accel_group.gtkobj());
  }

GtkWindowType Gtk::Window::get_window_type() const
  { return gtkobj()->type; }
