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


#include <glibmm.h>

#include <gtkmm/icontheme.h>
#include <gtkmm/private/icontheme_p.h>


/* Copyright (C) 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, see <https://www.gnu.org/licenses/>.
 */

#include <glibmm/vectorutils.h>
#include <gtk/gtk.h> //For gtk_icon_theme_error_get_type().

namespace
{


static const Glib::SignalProxyInfo IconTheme_signal_changed_info =
{
  "changed",
  (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
  (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
};


} // anonymous namespace


Gtk::IconThemeError::IconThemeError(Gtk::IconThemeError::Code error_code, const Glib::ustring& error_message)
:
  Glib::Error (GTK_ICON_THEME_ERROR, error_code, error_message)
{}

Gtk::IconThemeError::IconThemeError(GError* gobject)
:
  Glib::Error (gobject)
{}

Gtk::IconThemeError::Code Gtk::IconThemeError::code() const
{
  return static_cast<Code>(Glib::Error::code());
}

void Gtk::IconThemeError::throw_func(GError* gobject)
{
  throw Gtk::IconThemeError(gobject);
}

// static
GType Glib::Value<Gtk::IconThemeError::Code>::value_type()
{
  return gtk_icon_theme_error_get_type();
}


namespace Glib
{

Glib::RefPtr<Gtk::IconTheme> wrap(GtkIconTheme* object, bool take_copy)
{
  return Glib::make_refptr_for_instance<Gtk::IconTheme>( dynamic_cast<Gtk::IconTheme*> (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& IconTheme_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_ = &IconTheme_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_theme_get_type());

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

  }

  return *this;
}


void IconTheme_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* IconTheme_Class::wrap_new(GObject* object)
{
  return new IconTheme((GtkIconTheme*)object);
}


/* The implementation: */

GtkIconTheme* IconTheme::gobj_copy()
{
  reference();
  return gobj();
}

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

}

IconTheme::IconTheme(GtkIconTheme* castitem)
:
  Glib::Object((GObject*)(castitem))
{}


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

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


IconTheme::~IconTheme() noexcept
{}


IconTheme::CppClassType IconTheme::icontheme_class_; // initialize static member

GType IconTheme::get_type()
{
  return icontheme_class_.init().get_type();
}


GType IconTheme::get_base_type()
{
  return gtk_icon_theme_get_type();
}


IconTheme::IconTheme()
:
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
  Glib::ObjectBase(nullptr),
  Glib::Object(Glib::ConstructParams(icontheme_class_.init()))
{
  

}

Glib::RefPtr<IconTheme> IconTheme::create()
{
  return Glib::make_refptr_for_instance<IconTheme>( new IconTheme() );
}

Glib::RefPtr<IconTheme> IconTheme::get_for_display(const Glib::RefPtr<Gdk::Display>& display)
{

  auto retvalue = Glib::wrap(gtk_icon_theme_get_for_display(Glib::unwrap(display)));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us
  return retvalue;
}

Glib::RefPtr<Gdk::Display> IconTheme::get_display()
{
  auto retvalue = Glib::wrap(gtk_icon_theme_get_display(gobj()));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}

Glib::RefPtr<const Gdk::Display> IconTheme::get_display() const
{
  return const_cast<IconTheme*>(this)->get_display();
}

void IconTheme::set_search_path(const std::vector<std::string>& path)
{
  gtk_icon_theme_set_search_path(gobj(), Glib::ArrayHandler<std::string>::vector_to_array(path).data());
}

std::vector<std::string> IconTheme::get_search_path() const
{
  return Glib::ArrayHandler<std::string>::array_to_vector(gtk_icon_theme_get_search_path(const_cast<GtkIconTheme*>(gobj())), Glib::OWNERSHIP_DEEP);
}

void IconTheme::add_search_path(const std::string& path)
{
  gtk_icon_theme_add_search_path(gobj(), path.c_str());
}

void IconTheme::set_resource_path(const std::vector<std::string>& path)
{
  gtk_icon_theme_set_resource_path(gobj(), Glib::ArrayHandler<std::string>::vector_to_array(path).data());
}

std::vector<std::string> IconTheme::get_resource_path() const
{
  return Glib::ArrayHandler<std::string>::array_to_vector(gtk_icon_theme_get_resource_path(const_cast<GtkIconTheme*>(gobj())), Glib::OWNERSHIP_DEEP);
}

void IconTheme::add_resource_path(const std::string& path)
{
  gtk_icon_theme_add_resource_path(gobj(), path.c_str());
}

void IconTheme::set_theme_name(const Glib::ustring& theme_name)
{
  gtk_icon_theme_set_theme_name(gobj(), theme_name.c_str());
}

Glib::ustring IconTheme::get_theme_name() const
{
  return Glib::convert_return_gchar_ptr_to_ustring(gtk_icon_theme_get_theme_name(const_cast<GtkIconTheme*>(gobj())));
}

bool IconTheme::has_icon(const Glib::ustring& icon_name) const
{
  return gtk_icon_theme_has_icon(const_cast<GtkIconTheme*>(gobj()), icon_name.c_str());
}

bool IconTheme::has_gicon(const Glib::RefPtr<const Gio::Icon>& gicon) const
{
  return gtk_icon_theme_has_gicon(const_cast<GtkIconTheme*>(gobj()), const_cast<GIcon*>(Glib::unwrap<Gio::Icon>(gicon)));
}

std::vector<int> IconTheme::get_icon_sizes(const Glib::ustring& icon_name) const
{
  return Glib::ArrayHandler<int>::array_to_vector(gtk_icon_theme_get_icon_sizes(const_cast<GtkIconTheme*>(gobj()), icon_name.c_str()), Glib::OWNERSHIP_SHALLOW);
}

Glib::RefPtr<IconPaintable> IconTheme::lookup_icon(const Glib::ustring& icon_name, const std::vector<Glib::ustring>& fallbacks, int size, int scale, TextDirection direction, IconLookupFlags flags)
{
  return Glib::wrap(gtk_icon_theme_lookup_icon(gobj(), icon_name.c_str(), const_cast<const char**>(Glib::ArrayHandler<Glib::ustring>::vector_to_array(fallbacks).data()), size, scale, static_cast<GtkTextDirection>(direction), static_cast<GtkIconLookupFlags>(flags)));
}

Glib::RefPtr<IconPaintable> IconTheme::lookup_icon(const Glib::ustring& icon_name, int size, int scale, TextDirection direction, IconLookupFlags flags)
{
  return Glib::wrap(gtk_icon_theme_lookup_icon(gobj(), icon_name.c_str(), nullptr, size, scale, static_cast<GtkTextDirection>(direction), static_cast<GtkIconLookupFlags>(flags)));
}

Glib::RefPtr<const IconPaintable> IconTheme::lookup_icon(const Glib::ustring& icon_name, const std::vector<Glib::ustring>& fallbacks, int size, int scale, TextDirection direction, IconLookupFlags flags) const
{
  return const_cast<IconTheme*>(this)->lookup_icon(icon_name, fallbacks, size, scale, direction, flags);
}

Glib::RefPtr<const IconPaintable> IconTheme::lookup_icon(const Glib::ustring& icon_name, int size, int scale, TextDirection direction, IconLookupFlags flags) const
{
  return const_cast<IconTheme*>(this)->lookup_icon(icon_name, size, scale, direction, flags);
}

Glib::RefPtr<IconPaintable> IconTheme::lookup_icon(const Glib::RefPtr<const Gio::Icon>& icon, int size, int scale, TextDirection direction, IconLookupFlags flags)
{
  return Glib::wrap(gtk_icon_theme_lookup_by_gicon(gobj(), const_cast<GIcon*>(Glib::unwrap<Gio::Icon>(icon)), size, scale, static_cast<GtkTextDirection>(direction), static_cast<GtkIconLookupFlags>(flags)));
}

Glib::RefPtr<const IconPaintable> IconTheme::lookup_icon(const Glib::RefPtr<const Gio::Icon>& icon, int size, int scale, TextDirection direction, IconLookupFlags flags) const
{
  return const_cast<IconTheme*>(this)->lookup_icon(icon, size, scale, direction, flags);
}

std::vector<Glib::ustring> IconTheme::get_icon_names() const
{
  return Glib::ArrayHandler<Glib::ustring>::array_to_vector(gtk_icon_theme_get_icon_names(const_cast<GtkIconTheme*>(gobj())), Glib::OWNERSHIP_DEEP);
}


Glib::SignalProxy<void()> IconTheme::signal_changed()
{
  return Glib::SignalProxy<void() >(this, &IconTheme_signal_changed_info);
}


static_assert(Glib::Traits::ValueCompatibleWithWrapProperty<Glib::RefPtr<Gdk::Display>>::value,
  "Type Glib::RefPtr<Gdk::Display> cannot be used in _WRAP_PROPERTY. "
  "There is no suitable template specialization of Glib::Value<>.");

Glib::PropertyProxy< Glib::RefPtr<Gdk::Display> > IconTheme::property_display() 
{
  return Glib::PropertyProxy< Glib::RefPtr<Gdk::Display> >(this, "display");
}

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Display> > IconTheme::property_display() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Display> >(this, "display");
}

static_assert(Glib::Traits::ValueCompatibleWithWrapProperty<std::vector<Glib::ustring>>::value,
  "Type std::vector<Glib::ustring> cannot be used in _WRAP_PROPERTY. "
  "There is no suitable template specialization of Glib::Value<>.");

Glib::PropertyProxy_ReadOnly< std::vector<Glib::ustring> > IconTheme::property_icon_names() const
{
  return Glib::PropertyProxy_ReadOnly< std::vector<Glib::ustring> >(this, "icon-names");
}

static_assert(Glib::Traits::ValueCompatibleWithWrapProperty<std::vector<std::string>>::value,
  "Type std::vector<std::string> cannot be used in _WRAP_PROPERTY. "
  "There is no suitable template specialization of Glib::Value<>.");

Glib::PropertyProxy< std::vector<std::string> > IconTheme::property_search_path() 
{
  return Glib::PropertyProxy< std::vector<std::string> >(this, "search-path");
}

Glib::PropertyProxy_ReadOnly< std::vector<std::string> > IconTheme::property_search_path() const
{
  return Glib::PropertyProxy_ReadOnly< std::vector<std::string> >(this, "search-path");
}

static_assert(Glib::Traits::ValueCompatibleWithWrapProperty<std::vector<std::string>>::value,
  "Type std::vector<std::string> cannot be used in _WRAP_PROPERTY. "
  "There is no suitable template specialization of Glib::Value<>.");

Glib::PropertyProxy< std::vector<std::string> > IconTheme::property_resource_path() 
{
  return Glib::PropertyProxy< std::vector<std::string> >(this, "resource-path");
}

Glib::PropertyProxy_ReadOnly< std::vector<std::string> > IconTheme::property_resource_path() const
{
  return Glib::PropertyProxy_ReadOnly< std::vector<std::string> >(this, "resource-path");
}

Glib::PropertyProxy< Glib::ustring > IconTheme::property_theme_name() 
{
  return Glib::PropertyProxy< Glib::ustring >(this, "theme-name");
}

Glib::PropertyProxy_ReadOnly< Glib::ustring > IconTheme::property_theme_name() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::ustring >(this, "theme-name");
}


} // namespace Gtk


