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

#undef GTK_DISABLE_DEPRECATED
#define GDK_DISABLE_DEPRECATION_WARNINGS 1
 
#include <gtkmmconfig.h>
#ifndef GTKMM_DISABLE_DEPRECATED


#include <glibmm.h>

#include <gtkmm/appchooserwidget.h>
#include <gtkmm/private/appchooserwidget_p.h>


/* Copyright (C) 2011 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 <gtk/gtk.h>

namespace Gtk
{

} // namespace Gtk

namespace
{


extern "C" {
static void AppChooserWidget_signal_application_selected_connect_callback(GtkAppChooserWidget* self, GAppInfo* application,void* data)
{
  using namespace Gtk;
  using SlotType = sigc::slot<void(const Glib::RefPtr<Gio::AppInfo>&)>;

  auto obj = dynamic_cast<AppChooserWidget*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
  // Do not try to call a signal on a disassociated wrapper.
  if(obj)
  {
    try
    {
      if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(Glib::wrap(application, true)
);
    }
    catch(...)
    {
       Glib::exception_handlers_invoke();
    }
  }
}
} // extern "C"

static const Glib::SignalProxyInfo AppChooserWidget_signal_application_selected_info =
{
  "application-selected",
  (GCallback) &AppChooserWidget_signal_application_selected_connect_callback,
  (GCallback) &AppChooserWidget_signal_application_selected_connect_callback
};


extern "C" {
static void AppChooserWidget_signal_application_activated_connect_callback(GtkAppChooserWidget* self, GAppInfo* application,void* data)
{
  using namespace Gtk;
  using SlotType = sigc::slot<void(const Glib::RefPtr<Gio::AppInfo>&)>;

  auto obj = dynamic_cast<AppChooserWidget*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
  // Do not try to call a signal on a disassociated wrapper.
  if(obj)
  {
    try
    {
      if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(Glib::wrap(application, true)
);
    }
    catch(...)
    {
       Glib::exception_handlers_invoke();
    }
  }
}
} // extern "C"

static const Glib::SignalProxyInfo AppChooserWidget_signal_application_activated_info =
{
  "application-activated",
  (GCallback) &AppChooserWidget_signal_application_activated_connect_callback,
  (GCallback) &AppChooserWidget_signal_application_activated_connect_callback
};


} // anonymous namespace


namespace Glib
{

Gtk::AppChooserWidget* wrap(GtkAppChooserWidget* object, bool take_copy)
{
  return dynamic_cast<Gtk::AppChooserWidget *> (Glib::wrap_auto ((GObject*)(object), take_copy));
}

} /* namespace Glib */

namespace Gtk
{


/* The *_Class implementation: */

const Glib::Class& AppChooserWidget_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_ = &AppChooserWidget_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_app_chooser_widget_get_type());

    // Add derived versions of interfaces, if the C type implements any interfaces:
  AppChooser::add_interface(get_type());

  }

  return *this;
}


void AppChooserWidget_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* AppChooserWidget_Class::wrap_new(GObject* o)
{
  return manage(new AppChooserWidget((GtkAppChooserWidget*)(o)));

}


/* The implementation: */

AppChooserWidget::AppChooserWidget(const Glib::ConstructParams& construct_params)
:
  Widget(construct_params)
{
  }

AppChooserWidget::AppChooserWidget(GtkAppChooserWidget* castitem)
:
  Widget((GtkWidget*)(castitem))
{
  }


AppChooserWidget::AppChooserWidget(AppChooserWidget&& src) noexcept
: Widget(std::move(src))
  , AppChooser(std::move(src))
{}

AppChooserWidget& AppChooserWidget::operator=(AppChooserWidget&& src) noexcept
{
  Widget::operator=(std::move(src));
  AppChooser::operator=(std::move(src));
  return *this;
}

AppChooserWidget::~AppChooserWidget() noexcept
{
  destroy_();
}

AppChooserWidget::CppClassType AppChooserWidget::appchooserwidget_class_; // initialize static member

GType AppChooserWidget::get_type()
{
  return appchooserwidget_class_.init().get_type();
}


GType AppChooserWidget::get_base_type()
{
  return gtk_app_chooser_widget_get_type();
}


AppChooserWidget::AppChooserWidget(const Glib::ustring& content_type)
:
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
  Glib::ObjectBase(nullptr),
  Widget(Glib::ConstructParams(appchooserwidget_class_.init(), "content_type", content_type.c_str(), nullptr))
{
  

}

void AppChooserWidget::set_show_default(bool setting)
{
  gtk_app_chooser_widget_set_show_default(gobj(), static_cast<int>(setting));
}

bool AppChooserWidget::get_show_default()
{
  return gtk_app_chooser_widget_get_show_default(gobj());
}

void AppChooserWidget::set_show_recommended(bool setting)
{
  gtk_app_chooser_widget_set_show_recommended(gobj(), static_cast<int>(setting));
}

bool AppChooserWidget::get_show_recommended() const
{
  return gtk_app_chooser_widget_get_show_recommended(const_cast<GtkAppChooserWidget*>(gobj()));
}

void AppChooserWidget::set_show_fallback(bool setting)
{
  gtk_app_chooser_widget_set_show_fallback(gobj(), static_cast<int>(setting));
}

bool AppChooserWidget::get_show_fallback() const
{
  return gtk_app_chooser_widget_get_show_fallback(const_cast<GtkAppChooserWidget*>(gobj()));
}

void AppChooserWidget::set_show_other(bool setting)
{
  gtk_app_chooser_widget_set_show_other(gobj(), static_cast<int>(setting));
}

bool AppChooserWidget::get_show_other() const
{
  return gtk_app_chooser_widget_get_show_other(const_cast<GtkAppChooserWidget*>(gobj()));
}

void AppChooserWidget::set_show_all(bool setting)
{
  gtk_app_chooser_widget_set_show_all(gobj(), static_cast<int>(setting));
}

bool AppChooserWidget::get_show_all() const
{
  return gtk_app_chooser_widget_get_show_all(const_cast<GtkAppChooserWidget*>(gobj()));
}

void AppChooserWidget::set_default_text(const Glib::ustring& text)
{
  gtk_app_chooser_widget_set_default_text(gobj(), text.c_str());
}

Glib::ustring AppChooserWidget::get_default_text()
{
  return Glib::convert_const_gchar_ptr_to_ustring(gtk_app_chooser_widget_get_default_text(gobj()));
}


Glib::SignalProxy<void(const Glib::RefPtr<Gio::AppInfo>&)> AppChooserWidget::signal_application_selected()
{
  return Glib::SignalProxy<void(const Glib::RefPtr<Gio::AppInfo>&) >(this, &AppChooserWidget_signal_application_selected_info);
}


Glib::SignalProxy<void(const Glib::RefPtr<Gio::AppInfo>&)> AppChooserWidget::signal_application_activated()
{
  return Glib::SignalProxy<void(const Glib::RefPtr<Gio::AppInfo>&) >(this, &AppChooserWidget_signal_application_activated_info);
}


Glib::PropertyProxy< bool > AppChooserWidget::property_show_default() 
{
  return Glib::PropertyProxy< bool >(this, "show-default");
}

Glib::PropertyProxy_ReadOnly< bool > AppChooserWidget::property_show_default() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "show-default");
}

Glib::PropertyProxy< bool > AppChooserWidget::property_show_recommended() 
{
  return Glib::PropertyProxy< bool >(this, "show-recommended");
}

Glib::PropertyProxy_ReadOnly< bool > AppChooserWidget::property_show_recommended() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "show-recommended");
}

Glib::PropertyProxy< bool > AppChooserWidget::property_show_fallback() 
{
  return Glib::PropertyProxy< bool >(this, "show-fallback");
}

Glib::PropertyProxy_ReadOnly< bool > AppChooserWidget::property_show_fallback() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "show-fallback");
}

Glib::PropertyProxy< bool > AppChooserWidget::property_show_other() 
{
  return Glib::PropertyProxy< bool >(this, "show-other");
}

Glib::PropertyProxy_ReadOnly< bool > AppChooserWidget::property_show_other() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "show-other");
}

Glib::PropertyProxy< bool > AppChooserWidget::property_show_all() 
{
  return Glib::PropertyProxy< bool >(this, "show-all");
}

Glib::PropertyProxy_ReadOnly< bool > AppChooserWidget::property_show_all() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "show-all");
}

Glib::PropertyProxy< Glib::ustring > AppChooserWidget::property_default_text() 
{
  return Glib::PropertyProxy< Glib::ustring >(this, "default-text");
}

Glib::PropertyProxy_ReadOnly< Glib::ustring > AppChooserWidget::property_default_text() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::ustring >(this, "default-text");
}


} // namespace Gtk

#endif // GTKMM_DISABLE_DEPRECATED


