/* preferences-page-plugins.c generated by valac 0.35.5, the Vala compiler
 * generated from preferences-page-plugins.vala, do not modify */

/* This file is part of GNOME Games. License: GPLv3*/

#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>


#define GAMES_TYPE_PREFERENCES_PAGE (games_preferences_page_get_type ())
#define GAMES_PREFERENCES_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_PREFERENCES_PAGE, GamesPreferencesPage))
#define GAMES_IS_PREFERENCES_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_PREFERENCES_PAGE))
#define GAMES_PREFERENCES_PAGE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GAMES_TYPE_PREFERENCES_PAGE, GamesPreferencesPageIface))

typedef struct _GamesPreferencesPage GamesPreferencesPage;
typedef struct _GamesPreferencesPageIface GamesPreferencesPageIface;

#define GAMES_TYPE_PREFERENCES_PAGE_PLUGINS (games_preferences_page_plugins_get_type ())
#define GAMES_PREFERENCES_PAGE_PLUGINS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_PREFERENCES_PAGE_PLUGINS, GamesPreferencesPagePlugins))
#define GAMES_PREFERENCES_PAGE_PLUGINS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_PREFERENCES_PAGE_PLUGINS, GamesPreferencesPagePluginsClass))
#define GAMES_IS_PREFERENCES_PAGE_PLUGINS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_PREFERENCES_PAGE_PLUGINS))
#define GAMES_IS_PREFERENCES_PAGE_PLUGINS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_PREFERENCES_PAGE_PLUGINS))
#define GAMES_PREFERENCES_PAGE_PLUGINS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_PREFERENCES_PAGE_PLUGINS, GamesPreferencesPagePluginsClass))

typedef struct _GamesPreferencesPagePlugins GamesPreferencesPagePlugins;
typedef struct _GamesPreferencesPagePluginsClass GamesPreferencesPagePluginsClass;
typedef struct _GamesPreferencesPagePluginsPrivate GamesPreferencesPagePluginsPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define GAMES_TYPE_PLUGIN_REGISTRAR (games_plugin_registrar_get_type ())
#define GAMES_PLUGIN_REGISTRAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_PLUGIN_REGISTRAR, GamesPluginRegistrar))
#define GAMES_PLUGIN_REGISTRAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_PLUGIN_REGISTRAR, GamesPluginRegistrarClass))
#define GAMES_IS_PLUGIN_REGISTRAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_PLUGIN_REGISTRAR))
#define GAMES_IS_PLUGIN_REGISTRAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_PLUGIN_REGISTRAR))
#define GAMES_PLUGIN_REGISTRAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_PLUGIN_REGISTRAR, GamesPluginRegistrarClass))

typedef struct _GamesPluginRegistrar GamesPluginRegistrar;
typedef struct _GamesPluginRegistrarClass GamesPluginRegistrarClass;

#define GAMES_TYPE_PREFERENCES_PAGE_PLUGINS_ITEM (games_preferences_page_plugins_item_get_type ())
#define GAMES_PREFERENCES_PAGE_PLUGINS_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_PREFERENCES_PAGE_PLUGINS_ITEM, GamesPreferencesPagePluginsItem))
#define GAMES_PREFERENCES_PAGE_PLUGINS_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_PREFERENCES_PAGE_PLUGINS_ITEM, GamesPreferencesPagePluginsItemClass))
#define GAMES_IS_PREFERENCES_PAGE_PLUGINS_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_PREFERENCES_PAGE_PLUGINS_ITEM))
#define GAMES_IS_PREFERENCES_PAGE_PLUGINS_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_PREFERENCES_PAGE_PLUGINS_ITEM))
#define GAMES_PREFERENCES_PAGE_PLUGINS_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_PREFERENCES_PAGE_PLUGINS_ITEM, GamesPreferencesPagePluginsItemClass))

typedef struct _GamesPreferencesPagePluginsItem GamesPreferencesPagePluginsItem;
typedef struct _GamesPreferencesPagePluginsItemClass GamesPreferencesPagePluginsItemClass;

#define GAMES_TYPE_PLUGIN_REGISTER (games_plugin_register_get_type ())
#define GAMES_PLUGIN_REGISTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_PLUGIN_REGISTER, GamesPluginRegister))
#define GAMES_PLUGIN_REGISTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_PLUGIN_REGISTER, GamesPluginRegisterClass))
#define GAMES_IS_PLUGIN_REGISTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_PLUGIN_REGISTER))
#define GAMES_IS_PLUGIN_REGISTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_PLUGIN_REGISTER))
#define GAMES_PLUGIN_REGISTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_PLUGIN_REGISTER, GamesPluginRegisterClass))

typedef struct _GamesPluginRegister GamesPluginRegister;
typedef struct _GamesPluginRegisterClass GamesPluginRegisterClass;

struct _GamesPreferencesPageIface {
	GTypeInterface parent_iface;
	const gchar* (*get_title) (GamesPreferencesPage* self);
};

struct _GamesPreferencesPagePlugins {
	GtkBin parent_instance;
	GamesPreferencesPagePluginsPrivate * priv;
};

struct _GamesPreferencesPagePluginsClass {
	GtkBinClass parent_class;
};

struct _GamesPreferencesPagePluginsPrivate {
	GtkListBox* list_box;
};

typedef void (*GamesPluginRegisterPluginRegistrarFunc) (GamesPluginRegistrar* plugin_registrar, void* user_data);

static gpointer games_preferences_page_plugins_parent_class = NULL;
static GamesPreferencesPageIface * games_preferences_page_plugins_games_preferences_page_parent_iface = NULL;

GType games_preferences_page_get_type (void) G_GNUC_CONST;
GType games_preferences_page_plugins_get_type (void) G_GNUC_CONST;
#define GAMES_PREFERENCES_PAGE_PLUGINS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GAMES_TYPE_PREFERENCES_PAGE_PLUGINS, GamesPreferencesPagePluginsPrivate))
enum  {
	GAMES_PREFERENCES_PAGE_PLUGINS_DUMMY_PROPERTY,
	GAMES_PREFERENCES_PAGE_PLUGINS_TITLE
};
GType games_plugin_registrar_get_type (void) G_GNUC_CONST;
static void games_preferences_page_plugins_add_plugin_registrar (GamesPreferencesPagePlugins* self, GamesPluginRegistrar* plugin_registrar);
GType games_preferences_page_plugins_item_get_type (void) G_GNUC_CONST;
GamesPreferencesPagePluginsItem* games_preferences_page_plugins_item_new (GamesPluginRegistrar* plugin_registrar);
GamesPreferencesPagePluginsItem* games_preferences_page_plugins_item_construct (GType object_type, GamesPluginRegistrar* plugin_registrar);
GamesPreferencesPagePlugins* games_preferences_page_plugins_new (void);
GamesPreferencesPagePlugins* games_preferences_page_plugins_construct (GType object_type);
static GObject * games_preferences_page_plugins_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
GType games_plugin_register_get_type (void) G_GNUC_CONST;
GamesPluginRegister* games_plugin_register_get_register (void);
void games_plugin_register_foreach_plugin_registrar (GamesPluginRegister* self, GamesPluginRegisterPluginRegistrarFunc func, void* func_target);
static void _games_preferences_page_plugins___lambda26_ (GamesPreferencesPagePlugins* self, GamesPluginRegistrar* plugin_registrar);
static void __games_preferences_page_plugins___lambda26__games_plugin_register_plugin_registrar_func (GamesPluginRegistrar* plugin_registrar, gpointer self);
static void games_preferences_page_plugins_finalize (GObject * obj);
const gchar* games_preferences_page_get_title (GamesPreferencesPage* self);
static void _vala_games_preferences_page_plugins_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);


static void games_preferences_page_plugins_add_plugin_registrar (GamesPreferencesPagePlugins* self, GamesPluginRegistrar* plugin_registrar) {
	GamesPreferencesPagePluginsItem* item;
	GamesPluginRegistrar* _tmp0_;
	GamesPreferencesPagePluginsItem* _tmp1_;
	GtkListBoxRow* row;
	GtkListBoxRow* _tmp2_;
	GtkListBox* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (plugin_registrar != NULL);
	_tmp0_ = plugin_registrar;
	_tmp1_ = games_preferences_page_plugins_item_new (_tmp0_);
	g_object_ref_sink (_tmp1_);
	item = _tmp1_;
	_tmp2_ = (GtkListBoxRow*) gtk_list_box_row_new ();
	g_object_ref_sink (_tmp2_);
	row = _tmp2_;
	gtk_container_add ((GtkContainer*) row, (GtkWidget*) item);
	_tmp3_ = self->priv->list_box;
	gtk_container_add ((GtkContainer*) _tmp3_, (GtkWidget*) row);
	gtk_widget_show ((GtkWidget*) item);
	gtk_widget_show ((GtkWidget*) row);
	_g_object_unref0 (row);
	_g_object_unref0 (item);
}


GamesPreferencesPagePlugins* games_preferences_page_plugins_construct (GType object_type) {
	GamesPreferencesPagePlugins * self = NULL;
	self = (GamesPreferencesPagePlugins*) g_object_new (object_type, NULL);
	return self;
}


GamesPreferencesPagePlugins* games_preferences_page_plugins_new (void) {
	return games_preferences_page_plugins_construct (GAMES_TYPE_PREFERENCES_PAGE_PLUGINS);
}


static const gchar* games_preferences_page_plugins_real_get_title (GamesPreferencesPage* base) {
	const gchar* result;
	GamesPreferencesPagePlugins* self;
	self = (GamesPreferencesPagePlugins*) base;
	result = _ ("Extensions");
	return result;
}


static void _games_preferences_page_plugins___lambda26_ (GamesPreferencesPagePlugins* self, GamesPluginRegistrar* plugin_registrar) {
	GamesPluginRegistrar* _tmp0_;
	g_return_if_fail (plugin_registrar != NULL);
	_tmp0_ = plugin_registrar;
	games_preferences_page_plugins_add_plugin_registrar (self, _tmp0_);
}


static void __games_preferences_page_plugins___lambda26__games_plugin_register_plugin_registrar_func (GamesPluginRegistrar* plugin_registrar, gpointer self) {
	_games_preferences_page_plugins___lambda26_ ((GamesPreferencesPagePlugins*) self, plugin_registrar);
}


static GObject * games_preferences_page_plugins_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	GamesPreferencesPagePlugins * self;
	GamesPluginRegister* _register_;
	GamesPluginRegister* _tmp0_;
	GamesPluginRegister* _tmp1_;
	parent_class = G_OBJECT_CLASS (games_preferences_page_plugins_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GAMES_TYPE_PREFERENCES_PAGE_PLUGINS, GamesPreferencesPagePlugins);
	_tmp0_ = games_plugin_register_get_register ();
	_register_ = _tmp0_;
	_tmp1_ = _register_;
	games_plugin_register_foreach_plugin_registrar (_tmp1_, __games_preferences_page_plugins___lambda26__games_plugin_register_plugin_registrar_func, self);
	_g_object_unref0 (_register_);
	return obj;
}


static void games_preferences_page_plugins_class_init (GamesPreferencesPagePluginsClass * klass) {
	gint GamesPreferencesPagePlugins_private_offset;
	games_preferences_page_plugins_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (GamesPreferencesPagePluginsPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_games_preferences_page_plugins_get_property;
	G_OBJECT_CLASS (klass)->constructor = games_preferences_page_plugins_constructor;
	G_OBJECT_CLASS (klass)->finalize = games_preferences_page_plugins_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GAMES_PREFERENCES_PAGE_PLUGINS_TITLE, g_param_spec_string ("title", "title", "title", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	GamesPreferencesPagePlugins_private_offset = g_type_class_get_instance_private_offset (klass);
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/Games/ui/preferences-page-plugins.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "list_box", FALSE, GamesPreferencesPagePlugins_private_offset + G_STRUCT_OFFSET (GamesPreferencesPagePluginsPrivate, list_box));
}


static void games_preferences_page_plugins_games_preferences_page_interface_init (GamesPreferencesPageIface * iface) {
	games_preferences_page_plugins_games_preferences_page_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_title = games_preferences_page_plugins_real_get_title;
}


static void games_preferences_page_plugins_instance_init (GamesPreferencesPagePlugins * self) {
	self->priv = GAMES_PREFERENCES_PAGE_PLUGINS_GET_PRIVATE (self);
	gtk_widget_init_template (GTK_WIDGET (self));
}


static void games_preferences_page_plugins_finalize (GObject * obj) {
	GamesPreferencesPagePlugins * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GAMES_TYPE_PREFERENCES_PAGE_PLUGINS, GamesPreferencesPagePlugins);
	_g_object_unref0 (self->priv->list_box);
	G_OBJECT_CLASS (games_preferences_page_plugins_parent_class)->finalize (obj);
}


GType games_preferences_page_plugins_get_type (void) {
	static volatile gsize games_preferences_page_plugins_type_id__volatile = 0;
	if (g_once_init_enter (&games_preferences_page_plugins_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GamesPreferencesPagePluginsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) games_preferences_page_plugins_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GamesPreferencesPagePlugins), 0, (GInstanceInitFunc) games_preferences_page_plugins_instance_init, NULL };
		static const GInterfaceInfo games_preferences_page_info = { (GInterfaceInitFunc) games_preferences_page_plugins_games_preferences_page_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType games_preferences_page_plugins_type_id;
		games_preferences_page_plugins_type_id = g_type_register_static (gtk_bin_get_type (), "GamesPreferencesPagePlugins", &g_define_type_info, 0);
		g_type_add_interface_static (games_preferences_page_plugins_type_id, GAMES_TYPE_PREFERENCES_PAGE, &games_preferences_page_info);
		g_once_init_leave (&games_preferences_page_plugins_type_id__volatile, games_preferences_page_plugins_type_id);
	}
	return games_preferences_page_plugins_type_id__volatile;
}


static void _vala_games_preferences_page_plugins_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	GamesPreferencesPagePlugins * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GAMES_TYPE_PREFERENCES_PAGE_PLUGINS, GamesPreferencesPagePlugins);
	switch (property_id) {
		case GAMES_PREFERENCES_PAGE_PLUGINS_TITLE:
		g_value_set_string (value, games_preferences_page_get_title ((GamesPreferencesPage*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}



