// Generated by gtkmmproc -- DO NOT MODIFY!


#include <gtkmm/sizerequest.h>
#include <gtkmm/private/sizerequest_p.h>

// -*- c++ -*-
/* $Id: sizerequest.ccg,v 1.1 2003/01/21 13:38:48 murrayc Exp $ */

/* Copyright 2010 The gtkmm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <gtk/gtk.h>

namespace
{
} // anonymous namespace

// static
GType Glib::Value<Gtk::SizeRequestMode>::value_type()
{
  return gtk_size_request_mode_get_type();
}


namespace Glib
{

Glib::RefPtr<Gtk::SizeRequest> wrap(GtkSizeRequest* object, bool take_copy)
{
  return Glib::RefPtr<Gtk::SizeRequest>( dynamic_cast<Gtk::SizeRequest*> (Glib::wrap_auto_interface<Gtk::SizeRequest> ((GObject*)(object), take_copy)) );
  //We use dynamic_cast<> in case of multiple inheritance.
}

} // namespace Glib


namespace Gtk
{


/* The *_Class implementation: */

const Glib::Interface_Class& SizeRequest_Class::init()
{
  if(!gtype_) // create the GType if necessary
  {
    // Glib::Interface_Class has to know the interface init function
    // in order to add interfaces to implementing types.
    class_init_func_ = &SizeRequest_Class::iface_init_function;

    // We can not derive from another interface, and it is not necessary anyway.
    gtype_ = gtk_size_request_get_type();
  }

  return *this;
}

void SizeRequest_Class::iface_init_function(void* g_iface, void*)
{
  BaseClassType *const klass = static_cast<BaseClassType*>(g_iface);

  //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
  //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
  g_assert(klass != 0); 


}


Glib::ObjectBase* SizeRequest_Class::wrap_new(GObject* object)
{
  return new SizeRequest((GtkSizeRequest*)(object));
}


/* The implementation: */

SizeRequest::SizeRequest()
:
  Glib::Interface(sizerequest_class_.init())
{}

SizeRequest::SizeRequest(GtkSizeRequest* castitem)
:
  Glib::Interface((GObject*)(castitem))
{}

SizeRequest::SizeRequest(const Glib::Interface_Class& interface_class)
: Glib::Interface(interface_class)
{
}

SizeRequest::~SizeRequest()
{}

// static
void SizeRequest::add_interface(GType gtype_implementer)
{
  sizerequest_class_.init().add_interface(gtype_implementer);
}

SizeRequest::CppClassType SizeRequest::sizerequest_class_; // initialize static member

GType SizeRequest::get_type()
{
  return sizerequest_class_.init().get_type();
}


GType SizeRequest::get_base_type()
{
  return gtk_size_request_get_type();
}


SizeRequestMode SizeRequest::get_request_mode() const
{
  return ((SizeRequestMode)(gtk_size_request_get_request_mode(const_cast<GtkSizeRequest*>(gobj()))));
}

void SizeRequest::get_width(int& minimum_width, int& natural_width) const
{
gtk_size_request_get_width(const_cast<GtkSizeRequest*>(gobj()), &minimum_width, &natural_width); 
}

void SizeRequest::get_height_for_width(int width, int& minimum_height, int& natural_height) const
{
gtk_size_request_get_height_for_width(const_cast<GtkSizeRequest*>(gobj()), width, &minimum_height, &natural_height); 
}

void SizeRequest::get_height(int& minimum_height, int& natural_height) const
{
gtk_size_request_get_height(const_cast<GtkSizeRequest*>(gobj()), &minimum_height, &natural_height); 
}

void SizeRequest::get_width_for_height(int height, int& minimum_width, int& natural_width) const
{
gtk_size_request_get_width_for_height(const_cast<GtkSizeRequest*>(gobj()), height, &minimum_width, &natural_width); 
}

void SizeRequest::get_size(Requisition& minimum_size, Requisition& natural_size)
{
gtk_size_request_get_size(gobj(), (GtkRequisition*)(&minimum_size), (GtkRequisition*)(&natural_size)); 
}


} // namespace Gtk


