// Generated by gmmproc 2.61.1 -- DO NOT MODIFY!


#include <glibmm.h>

#include <gtkmm/iconinfo.h>
#include <gtkmm/private/iconinfo_p.h>


/* Copyright 2003 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */

#include <glibmm/vectorutils.h>
#include <giomm/slot_async.h>

#include <gtk/gtk.h>
#include <gdkmm/texture.h>
#include <gtkmm/icontheme.h>

namespace Gtk
{

IconInfo::IconInfo(const Glib::RefPtr<IconTheme>& icon_theme, const Glib::RefPtr<Gdk::Pixbuf>& pixbuf)
: Glib::Object((GObject*)gtk_icon_info_new_for_pixbuf(Glib::unwrap(icon_theme), pixbuf->gobj()))
{
}

} // namespace Gtk

namespace
{
} // anonymous namespace


namespace Glib
{

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

} /* namespace Glib */


namespace Gtk
{


/* The *_Class implementation: */

const Glib::Class& IconInfo_Class::init()
{
  if(!gtype_) // create the GType if necessary
  {
    // Glib::Class has to know the class init function to clone custom types.
    class_init_func_ = &IconInfo_Class::class_init_function;

    // This is actually just optimized away, apparently with no harm.
    // Make sure that the parent type has been created.
    //CppClassParent::CppObjectType::get_type();

    // Create the wrapper type, with the same class/instance size as the base type.
    register_derived_type(gtk_icon_info_get_type());

    // Add derived versions of interfaces, if the C type implements any interfaces:

  }

  return *this;
}


void IconInfo_Class::class_init_function(void* g_class, void* class_data)
{
  const auto klass = static_cast<BaseClassType*>(g_class);
  CppClassParent::class_init_function(klass, class_data);


}


Glib::ObjectBase* IconInfo_Class::wrap_new(GObject* object)
{
  return new IconInfo((GtkIconInfo*)object);
}


/* The implementation: */

GtkIconInfo* IconInfo::gobj_copy()
{
  reference();
  return gobj();
}

IconInfo::IconInfo(const Glib::ConstructParams& construct_params)
:
  Glib::Object(construct_params)
{

}

IconInfo::IconInfo(GtkIconInfo* castitem)
:
  Glib::Object((GObject*)(castitem))
{}


IconInfo::IconInfo(IconInfo&& src) noexcept
: Glib::Object(std::move(src))
{}

IconInfo& IconInfo::operator=(IconInfo&& src) noexcept
{
  Glib::Object::operator=(std::move(src));
  return *this;
}


IconInfo::~IconInfo() noexcept
{}


IconInfo::CppClassType IconInfo::iconinfo_class_; // initialize static member

GType IconInfo::get_type()
{
  return iconinfo_class_.init().get_type();
}


GType IconInfo::get_base_type()
{
  return gtk_icon_info_get_type();
}


Glib::RefPtr<IconInfo> IconInfo::create(const Glib::RefPtr<IconTheme>& icon_theme, const Glib::RefPtr<Gdk::Pixbuf>& pixbuf)
{
  return Glib::make_refptr_for_instance<IconInfo>( new IconInfo(icon_theme, pixbuf) );
}

int IconInfo::get_base_size() const
{
  return gtk_icon_info_get_base_size(const_cast<GtkIconInfo*>(gobj()));
}

int IconInfo::get_base_scale() const
{
  return gtk_icon_info_get_base_scale(const_cast<GtkIconInfo*>(gobj()));
}

Glib::ustring IconInfo::get_filename() const
{
  return Glib::convert_const_gchar_ptr_to_ustring(gtk_icon_info_get_filename(const_cast<GtkIconInfo*>(gobj())));
}

bool IconInfo::is_symbolic() const
{
  return gtk_icon_info_is_symbolic(const_cast<GtkIconInfo*>(gobj()));
}

Glib::RefPtr<const Gdk::Pixbuf> IconInfo::load_icon() const
{
  GError* gerror = nullptr;
  auto retvalue = Glib::wrap(gtk_icon_info_load_icon(const_cast<GtkIconInfo*>(gobj()), &(gerror)));
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}

Glib::RefPtr<const Gdk::Texture> IconInfo::load_texture() const
{
  return Glib::wrap(gtk_icon_info_load_texture(const_cast<GtkIconInfo*>(gobj())));
}

void IconInfo::load_icon_async(const Gio::SlotAsyncReady& slot, const Glib::RefPtr<Gio::Cancellable>& cancellable) const
{
  // Create a copy of the slot.
  auto slot_copy = new Gio::SlotAsyncReady(slot); 

  gtk_icon_info_load_icon_async(const_cast<GtkIconInfo*>(gobj()), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &Gio::SignalProxy_async_callback, slot_copy);
}

void IconInfo::load_icon_async(const Gio::SlotAsyncReady& slot) const
{
  // Create a copy of the slot.
  auto slot_copy = new Gio::SlotAsyncReady(slot); 

  gtk_icon_info_load_icon_async(const_cast<GtkIconInfo*>(gobj()), nullptr, &Gio::SignalProxy_async_callback, slot_copy);
}

Glib::RefPtr<const Gdk::Pixbuf> IconInfo::load_icon_finish(const Glib::RefPtr<Gio::AsyncResult>& result) const
{
  GError* gerror = nullptr;
  auto retvalue = Glib::wrap(gtk_icon_info_load_icon_finish(const_cast<GtkIconInfo*>(gobj()), Glib::unwrap(result), &(gerror)));
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}

Glib::RefPtr<const Gdk::Pixbuf> IconInfo::load_symbolic(const Gdk::RGBA& fg, const Gdk::RGBA& success_color, const Gdk::RGBA& warning_color, const Gdk::RGBA& error_color, bool& was_symbolic) const
{
  GError* gerror = nullptr;
  gboolean g_was_symbolic = gboolean();
  auto retvalue = Glib::wrap(gtk_icon_info_load_symbolic(const_cast<GtkIconInfo*>(gobj()), (fg).gobj(), (success_color).gobj(), (warning_color).gobj(), (error_color).gobj(), &g_was_symbolic, &(gerror)));
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
was_symbolic = static_cast<bool>(g_was_symbolic);
  return retvalue;
}

void IconInfo::load_symbolic_async(const Gdk::RGBA& fg, const Gdk::RGBA& success_color, const Gdk::RGBA& warning_color, const Gdk::RGBA& error_color, const Gio::SlotAsyncReady& slot, const Glib::RefPtr<Gio::Cancellable>& cancellable) const
{
  // Create a copy of the slot.
  auto slot_copy = new Gio::SlotAsyncReady(slot); 

  gtk_icon_info_load_symbolic_async(const_cast<GtkIconInfo*>(gobj()), (fg).gobj(), (success_color).gobj(), (warning_color).gobj(), (error_color).gobj(), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &Gio::SignalProxy_async_callback, slot_copy);
}

void IconInfo::load_symbolic_async(const Gdk::RGBA& fg, const Gdk::RGBA& success_color, const Gdk::RGBA& warning_color, const Gdk::RGBA& error_color, const Gio::SlotAsyncReady& slot) const
{
  // Create a copy of the slot.
  auto slot_copy = new Gio::SlotAsyncReady(slot); 

  gtk_icon_info_load_symbolic_async(const_cast<GtkIconInfo*>(gobj()), (fg).gobj(), (success_color).gobj(), (warning_color).gobj(), (error_color).gobj(), nullptr, &Gio::SignalProxy_async_callback, slot_copy);
}

Glib::RefPtr<const Gdk::Pixbuf> IconInfo::load_symbolic_finish(const Glib::RefPtr<Gio::AsyncResult>& result, bool& was_symbolic) const
{
  GError* gerror = nullptr;
  gboolean g_was_symbolic = gboolean();
  auto retvalue = Glib::wrap(gtk_icon_info_load_symbolic_finish(const_cast<GtkIconInfo*>(gobj()), Glib::unwrap(result), &g_was_symbolic, &(gerror)));
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
was_symbolic = static_cast<bool>(g_was_symbolic);
  return retvalue;
}

Glib::RefPtr<const Gdk::Pixbuf> IconInfo::load_symbolic_for_context(const Glib::RefPtr<StyleContext>& context, bool& was_symbolic) const
{
  GError* gerror = nullptr;
  gboolean g_was_symbolic = gboolean();
  auto retvalue = Glib::wrap(gtk_icon_info_load_symbolic_for_context(const_cast<GtkIconInfo*>(gobj()), Glib::unwrap(context), &g_was_symbolic, &(gerror)));
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
was_symbolic = static_cast<bool>(g_was_symbolic);
  return retvalue;
}

void IconInfo::load_symbolic_for_context_async(const Glib::RefPtr<StyleContext>& context, const Gio::SlotAsyncReady& slot, const Glib::RefPtr<Gio::Cancellable>& cancellable) const
{
  // Create a copy of the slot.
  auto slot_copy = new Gio::SlotAsyncReady(slot); 

  gtk_icon_info_load_symbolic_for_context_async(const_cast<GtkIconInfo*>(gobj()), Glib::unwrap(context), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &Gio::SignalProxy_async_callback, slot_copy);
}

void IconInfo::load_symbolic_for_context_async(const Glib::RefPtr<StyleContext>& context, const Gio::SlotAsyncReady& slot) const
{
  // Create a copy of the slot.
  auto slot_copy = new Gio::SlotAsyncReady(slot); 

  gtk_icon_info_load_symbolic_for_context_async(const_cast<GtkIconInfo*>(gobj()), Glib::unwrap(context), nullptr, &Gio::SignalProxy_async_callback, slot_copy);
}

Glib::RefPtr<const Gdk::Pixbuf> IconInfo::load_symbolic_for_context_finish(const Glib::RefPtr<Gio::AsyncResult>& result, bool& was_symbolic) const
{
  GError* gerror = nullptr;
  gboolean g_was_symbolic = gboolean();
  auto retvalue = Glib::wrap(gtk_icon_info_load_symbolic_for_context_finish(const_cast<GtkIconInfo*>(gobj()), Glib::unwrap(result), &g_was_symbolic, &(gerror)));
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
was_symbolic = static_cast<bool>(g_was_symbolic);
  return retvalue;
}


} // namespace Gtk


