/* preferences-page-video.c generated by valac 0.36.12.13-3ae08, the Vala compiler
 * generated from preferences-page-video.vala, do not modify */

/* This file is part of GNOME Games. License: GPL-3.0+.*/

#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gio.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_VIDEO (games_preferences_page_video_get_type ())
#define GAMES_PREFERENCES_PAGE_VIDEO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_PREFERENCES_PAGE_VIDEO, GamesPreferencesPageVideo))
#define GAMES_PREFERENCES_PAGE_VIDEO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_PREFERENCES_PAGE_VIDEO, GamesPreferencesPageVideoClass))
#define GAMES_IS_PREFERENCES_PAGE_VIDEO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_PREFERENCES_PAGE_VIDEO))
#define GAMES_IS_PREFERENCES_PAGE_VIDEO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_PREFERENCES_PAGE_VIDEO))
#define GAMES_PREFERENCES_PAGE_VIDEO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_PREFERENCES_PAGE_VIDEO, GamesPreferencesPageVideoClass))

typedef struct _GamesPreferencesPageVideo GamesPreferencesPageVideo;
typedef struct _GamesPreferencesPageVideoClass GamesPreferencesPageVideoClass;
typedef struct _GamesPreferencesPageVideoPrivate GamesPreferencesPageVideoPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define GAMES_TYPE_CHECKMARK_ITEM (games_checkmark_item_get_type ())
#define GAMES_CHECKMARK_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_CHECKMARK_ITEM, GamesCheckmarkItem))
#define GAMES_CHECKMARK_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_CHECKMARK_ITEM, GamesCheckmarkItemClass))
#define GAMES_IS_CHECKMARK_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_CHECKMARK_ITEM))
#define GAMES_IS_CHECKMARK_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_CHECKMARK_ITEM))
#define GAMES_CHECKMARK_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_CHECKMARK_ITEM, GamesCheckmarkItemClass))

typedef struct _GamesCheckmarkItem GamesCheckmarkItem;
typedef struct _GamesCheckmarkItemClass GamesCheckmarkItemClass;

struct _GamesPreferencesPageIface {
	GTypeInterface parent_iface;
	void (*visible_page_changed) (GamesPreferencesPage* self);
	GtkHeaderBar* (*get_header_bar) (GamesPreferencesPage* self);
	void (*set_header_bar) (GamesPreferencesPage* self, GtkHeaderBar* value);
	gboolean (*get_immersive_mode) (GamesPreferencesPage* self);
	void (*set_immersive_mode) (GamesPreferencesPage* self, gboolean value);
};

struct _GamesPreferencesPageVideo {
	GtkBin parent_instance;
	GamesPreferencesPageVideoPrivate * priv;
};

struct _GamesPreferencesPageVideoClass {
	GtkBinClass parent_class;
};

struct _GamesPreferencesPageVideoPrivate {
	GtkHeaderBar* _header_bar;
	gchar* _filter_active;
	gchar** filter_display_names;
	gint filter_display_names_length1;
	gint _filter_display_names_size_;
	gchar** filter_names;
	gint filter_names_length1;
	gint _filter_names_size_;
	GtkListBox* filter_list_box;
	GSettings* settings;
};


static gpointer games_preferences_page_video_parent_class = NULL;
static GamesPreferencesPageIface * games_preferences_page_video_games_preferences_page_parent_iface = NULL;

GType games_preferences_page_get_type (void) G_GNUC_CONST;
GType games_preferences_page_video_get_type (void) G_GNUC_CONST;
#define GAMES_PREFERENCES_PAGE_VIDEO_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GAMES_TYPE_PREFERENCES_PAGE_VIDEO, GamesPreferencesPageVideoPrivate))
enum  {
	GAMES_PREFERENCES_PAGE_VIDEO_0_PROPERTY,
	GAMES_PREFERENCES_PAGE_VIDEO_HEADER_BAR_PROPERTY,
	GAMES_PREFERENCES_PAGE_VIDEO_IMMERSIVE_MODE_PROPERTY,
	GAMES_PREFERENCES_PAGE_VIDEO_FILTER_ACTIVE_PROPERTY
};
static void games_preferences_page_video_filter_list_box_row_activated (GamesPreferencesPageVideo* self, GtkListBoxRow* row_item);
void games_preferences_page_video_set_filter_active (GamesPreferencesPageVideo* self, const gchar* value);
static void _games_preferences_page_video_filter_list_box_row_activated_gtk_list_box_row_activated (GtkListBox* _sender, GtkListBoxRow* row, gpointer self);
GamesPreferencesPageVideo* games_preferences_page_video_new (void);
GamesPreferencesPageVideo* games_preferences_page_video_construct (GType object_type);
const gchar* games_preferences_page_video_get_filter_active (GamesPreferencesPageVideo* self);
GType games_checkmark_item_get_type (void) G_GNUC_CONST;
void games_checkmark_item_set_checkmark_visible (GamesCheckmarkItem* self, gboolean value);
static GObject * games_preferences_page_video_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
GamesCheckmarkItem* games_checkmark_item_new (const gchar* name);
GamesCheckmarkItem* games_checkmark_item_construct (GType object_type, const gchar* name);
static void games_preferences_page_video_finalize (GObject * obj);
GtkHeaderBar* games_preferences_page_get_header_bar (GamesPreferencesPage* self);
gboolean games_preferences_page_get_immersive_mode (GamesPreferencesPage* self);
static void _vala_games_preferences_page_video_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
void games_preferences_page_set_header_bar (GamesPreferencesPage* self, GtkHeaderBar* value);
void games_preferences_page_set_immersive_mode (GamesPreferencesPage* self, gboolean value);
static void _vala_games_preferences_page_video_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);


static void games_preferences_page_video_filter_list_box_row_activated (GamesPreferencesPageVideo* self, GtkListBoxRow* row_item) {
	gchar** _tmp0_;
	gint _tmp0__length1;
	GtkListBoxRow* _tmp1_;
	gint _tmp2_;
	const gchar* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (row_item != NULL);
	_tmp0_ = self->priv->filter_names;
	_tmp0__length1 = self->priv->filter_names_length1;
	_tmp1_ = row_item;
	_tmp2_ = gtk_list_box_row_get_index (_tmp1_);
	_tmp3_ = _tmp0_[_tmp2_];
	games_preferences_page_video_set_filter_active (self, _tmp3_);
}


static void _games_preferences_page_video_filter_list_box_row_activated_gtk_list_box_row_activated (GtkListBox* _sender, GtkListBoxRow* row, gpointer self) {
	games_preferences_page_video_filter_list_box_row_activated ((GamesPreferencesPageVideo*) self, row);
}


GamesPreferencesPageVideo* games_preferences_page_video_construct (GType object_type) {
	GamesPreferencesPageVideo * self = NULL;
	self = (GamesPreferencesPageVideo*) g_object_new (object_type, NULL);
	return self;
}


GamesPreferencesPageVideo* games_preferences_page_video_new (void) {
	return games_preferences_page_video_construct (GAMES_TYPE_PREFERENCES_PAGE_VIDEO);
}


static GtkHeaderBar* games_preferences_page_video_real_get_header_bar (GamesPreferencesPage* base) {
	GtkHeaderBar* result;
	GamesPreferencesPageVideo* self;
	GtkHeaderBar* _tmp0_;
	self = (GamesPreferencesPageVideo*) base;
	_tmp0_ = self->priv->_header_bar;
	result = _tmp0_;
	return result;
}


static void games_preferences_page_video_real_set_header_bar (GamesPreferencesPage* base, GtkHeaderBar* value) {
	GamesPreferencesPageVideo* self;
	self = (GamesPreferencesPageVideo*) base;
	g_object_notify ((GObject *) self, "header-bar");
}


static gboolean games_preferences_page_video_real_get_immersive_mode (GamesPreferencesPage* base) {
	gboolean result;
	GamesPreferencesPageVideo* self;
	self = (GamesPreferencesPageVideo*) base;
	result = FALSE;
	return result;
}


static void games_preferences_page_video_real_set_immersive_mode (GamesPreferencesPage* base, gboolean value) {
	GamesPreferencesPageVideo* self;
	self = (GamesPreferencesPageVideo*) base;
	g_object_notify ((GObject *) self, "immersive-mode");
}


const gchar* games_preferences_page_video_get_filter_active (GamesPreferencesPageVideo* self) {
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_filter_active;
	result = _tmp0_;
	return result;
}


static gpointer _g_object_ref0 (gpointer self) {
	return self ? g_object_ref (self) : NULL;
}


void games_preferences_page_video_set_filter_active (GamesPreferencesPageVideo* self, const gchar* value) {
	const gchar* _tmp16_;
	gchar* _tmp17_;
	g_return_if_fail (self != NULL);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				gint _tmp2_;
				gchar** _tmp3_;
				gint _tmp3__length1;
				GtkListBoxRow* row_item = NULL;
				GtkListBox* _tmp4_;
				gint _tmp5_;
				GtkListBoxRow* _tmp6_;
				GtkListBoxRow* _tmp7_;
				GamesCheckmarkItem* checkmark_item = NULL;
				GtkListBoxRow* _tmp8_;
				GtkWidget* _tmp9_;
				GamesCheckmarkItem* _tmp10_;
				GamesCheckmarkItem* _tmp11_;
				const gchar* _tmp12_;
				gchar** _tmp13_;
				gint _tmp13__length1;
				gint _tmp14_;
				const gchar* _tmp15_;
				if (!_tmp0_) {
					gint _tmp1_;
					_tmp1_ = i;
					i = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				_tmp2_ = i;
				_tmp3_ = self->priv->filter_names;
				_tmp3__length1 = self->priv->filter_names_length1;
				if (!(_tmp2_ < _tmp3__length1)) {
					break;
				}
				_tmp4_ = self->priv->filter_list_box;
				_tmp5_ = i;
				_tmp6_ = gtk_list_box_get_row_at_index (_tmp4_, _tmp5_);
				_tmp7_ = _g_object_ref0 (_tmp6_);
				row_item = _tmp7_;
				_tmp8_ = row_item;
				_tmp9_ = gtk_bin_get_child ((GtkBin*) _tmp8_);
				_tmp10_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GAMES_TYPE_CHECKMARK_ITEM, GamesCheckmarkItem));
				checkmark_item = _tmp10_;
				_tmp11_ = checkmark_item;
				_tmp12_ = value;
				_tmp13_ = self->priv->filter_names;
				_tmp13__length1 = self->priv->filter_names_length1;
				_tmp14_ = i;
				_tmp15_ = _tmp13_[_tmp14_];
				games_checkmark_item_set_checkmark_visible (_tmp11_, g_strcmp0 (_tmp12_, _tmp15_) == 0);
				_g_object_unref0 (checkmark_item);
				_g_object_unref0 (row_item);
			}
		}
	}
	_tmp16_ = value;
	_tmp17_ = g_strdup (_tmp16_);
	_g_free0 (self->priv->_filter_active);
	self->priv->_filter_active = _tmp17_;
	g_object_notify ((GObject *) self, "filter-active");
}


static GObject * games_preferences_page_video_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	GamesPreferencesPageVideo * self;
	gchar** _tmp0_;
	gint _tmp0__length1;
	GSettings* _tmp6_;
	GSettings* _tmp7_;
	parent_class = G_OBJECT_CLASS (games_preferences_page_video_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GAMES_TYPE_PREFERENCES_PAGE_VIDEO, GamesPreferencesPageVideo);
	_tmp0_ = self->priv->filter_display_names;
	_tmp0__length1 = self->priv->filter_display_names_length1;
	{
		gchar** filter_display_name_collection = NULL;
		gint filter_display_name_collection_length1 = 0;
		gint _filter_display_name_collection_size_ = 0;
		gint filter_display_name_it = 0;
		filter_display_name_collection = _tmp0_;
		filter_display_name_collection_length1 = _tmp0__length1;
		for (filter_display_name_it = 0; filter_display_name_it < _tmp0__length1; filter_display_name_it = filter_display_name_it + 1) {
			gchar* _tmp1_;
			gchar* filter_display_name = NULL;
			_tmp1_ = g_strdup (filter_display_name_collection[filter_display_name_it]);
			filter_display_name = _tmp1_;
			{
				GamesCheckmarkItem* checkmark_item = NULL;
				const gchar* _tmp2_;
				GamesCheckmarkItem* _tmp3_;
				GtkListBox* _tmp4_;
				GamesCheckmarkItem* _tmp5_;
				_tmp2_ = filter_display_name;
				_tmp3_ = games_checkmark_item_new (_tmp2_);
				g_object_ref_sink (_tmp3_);
				checkmark_item = _tmp3_;
				_tmp4_ = self->priv->filter_list_box;
				_tmp5_ = checkmark_item;
				gtk_container_add ((GtkContainer*) _tmp4_, (GtkWidget*) _tmp5_);
				_g_object_unref0 (checkmark_item);
				_g_free0 (filter_display_name);
			}
		}
	}
	_tmp6_ = g_settings_new ("org.gnome.Games");
	_g_object_unref0 (self->priv->settings);
	self->priv->settings = _tmp6_;
	_tmp7_ = self->priv->settings;
	g_settings_bind (_tmp7_, "video-filter", (GObject*) self, "filter-active", G_SETTINGS_BIND_DEFAULT);
	return obj;
}


static void games_preferences_page_video_class_init (GamesPreferencesPageVideoClass * klass) {
	gint GamesPreferencesPageVideo_private_offset;
	games_preferences_page_video_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (GamesPreferencesPageVideoPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_games_preferences_page_video_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_games_preferences_page_video_set_property;
	G_OBJECT_CLASS (klass)->constructor = games_preferences_page_video_constructor;
	G_OBJECT_CLASS (klass)->finalize = games_preferences_page_video_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GAMES_PREFERENCES_PAGE_VIDEO_HEADER_BAR_PROPERTY, g_param_spec_object ("header-bar", "header-bar", "header-bar", gtk_header_bar_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GAMES_PREFERENCES_PAGE_VIDEO_IMMERSIVE_MODE_PROPERTY, g_param_spec_boolean ("immersive-mode", "immersive-mode", "immersive-mode", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GAMES_PREFERENCES_PAGE_VIDEO_FILTER_ACTIVE_PROPERTY, g_param_spec_string ("filter-active", "filter-active", "filter-active", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	GamesPreferencesPageVideo_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-video.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "header_bar", FALSE, GamesPreferencesPageVideo_private_offset + G_STRUCT_OFFSET (GamesPreferencesPageVideoPrivate, _header_bar));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "filter_list_box", FALSE, GamesPreferencesPageVideo_private_offset + G_STRUCT_OFFSET (GamesPreferencesPageVideoPrivate, filter_list_box));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "filter_list_box_row_activated", G_CALLBACK(_games_preferences_page_video_filter_list_box_row_activated_gtk_list_box_row_activated));
}


static void games_preferences_page_video_games_preferences_page_interface_init (GamesPreferencesPageIface * iface) {
	games_preferences_page_video_games_preferences_page_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_header_bar = games_preferences_page_video_real_get_header_bar;
	iface->set_header_bar = games_preferences_page_video_real_set_header_bar;
	iface->get_immersive_mode = games_preferences_page_video_real_get_immersive_mode;
	iface->set_immersive_mode = games_preferences_page_video_real_set_immersive_mode;
}


static void games_preferences_page_video_instance_init (GamesPreferencesPageVideo * self) {
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar** _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar** _tmp7_;
	self->priv = GAMES_PREFERENCES_PAGE_VIDEO_GET_PRIVATE (self);
	_tmp0_ = g_strdup (_ ("Smooth"));
	_tmp1_ = g_strdup (_ ("Sharp"));
	_tmp2_ = g_strdup (_ ("CRT"));
	_tmp3_ = g_new0 (gchar*, 3 + 1);
	_tmp3_[0] = _tmp0_;
	_tmp3_[1] = _tmp1_;
	_tmp3_[2] = _tmp2_;
	self->priv->filter_display_names = _tmp3_;
	self->priv->filter_display_names_length1 = 3;
	self->priv->_filter_display_names_size_ = self->priv->filter_display_names_length1;
	_tmp4_ = g_strdup ("smooth");
	_tmp5_ = g_strdup ("sharp");
	_tmp6_ = g_strdup ("crt");
	_tmp7_ = g_new0 (gchar*, 3 + 1);
	_tmp7_[0] = _tmp4_;
	_tmp7_[1] = _tmp5_;
	_tmp7_[2] = _tmp6_;
	self->priv->filter_names = _tmp7_;
	self->priv->filter_names_length1 = 3;
	self->priv->_filter_names_size_ = self->priv->filter_names_length1;
	gtk_widget_init_template (GTK_WIDGET (self));
}


static void games_preferences_page_video_finalize (GObject * obj) {
	GamesPreferencesPageVideo * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GAMES_TYPE_PREFERENCES_PAGE_VIDEO, GamesPreferencesPageVideo);
	_g_object_unref0 (self->priv->_header_bar);
	_g_free0 (self->priv->_filter_active);
	self->priv->filter_display_names = (_vala_array_free (self->priv->filter_display_names, self->priv->filter_display_names_length1, (GDestroyNotify) g_free), NULL);
	self->priv->filter_names = (_vala_array_free (self->priv->filter_names, self->priv->filter_names_length1, (GDestroyNotify) g_free), NULL);
	_g_object_unref0 (self->priv->filter_list_box);
	_g_object_unref0 (self->priv->settings);
	G_OBJECT_CLASS (games_preferences_page_video_parent_class)->finalize (obj);
}


GType games_preferences_page_video_get_type (void) {
	static volatile gsize games_preferences_page_video_type_id__volatile = 0;
	if (g_once_init_enter (&games_preferences_page_video_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GamesPreferencesPageVideoClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) games_preferences_page_video_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GamesPreferencesPageVideo), 0, (GInstanceInitFunc) games_preferences_page_video_instance_init, NULL };
		static const GInterfaceInfo games_preferences_page_info = { (GInterfaceInitFunc) games_preferences_page_video_games_preferences_page_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType games_preferences_page_video_type_id;
		games_preferences_page_video_type_id = g_type_register_static (gtk_bin_get_type (), "GamesPreferencesPageVideo", &g_define_type_info, 0);
		g_type_add_interface_static (games_preferences_page_video_type_id, GAMES_TYPE_PREFERENCES_PAGE, &games_preferences_page_info);
		g_once_init_leave (&games_preferences_page_video_type_id__volatile, games_preferences_page_video_type_id);
	}
	return games_preferences_page_video_type_id__volatile;
}


static void _vala_games_preferences_page_video_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	GamesPreferencesPageVideo * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GAMES_TYPE_PREFERENCES_PAGE_VIDEO, GamesPreferencesPageVideo);
	switch (property_id) {
		case GAMES_PREFERENCES_PAGE_VIDEO_HEADER_BAR_PROPERTY:
		g_value_set_object (value, games_preferences_page_get_header_bar ((GamesPreferencesPage*) self));
		break;
		case GAMES_PREFERENCES_PAGE_VIDEO_IMMERSIVE_MODE_PROPERTY:
		g_value_set_boolean (value, games_preferences_page_get_immersive_mode ((GamesPreferencesPage*) self));
		break;
		case GAMES_PREFERENCES_PAGE_VIDEO_FILTER_ACTIVE_PROPERTY:
		g_value_set_string (value, games_preferences_page_video_get_filter_active (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_games_preferences_page_video_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	GamesPreferencesPageVideo * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GAMES_TYPE_PREFERENCES_PAGE_VIDEO, GamesPreferencesPageVideo);
	switch (property_id) {
		case GAMES_PREFERENCES_PAGE_VIDEO_HEADER_BAR_PROPERTY:
		games_preferences_page_set_header_bar ((GamesPreferencesPage*) self, g_value_get_object (value));
		break;
		case GAMES_PREFERENCES_PAGE_VIDEO_IMMERSIVE_MODE_PROPERTY:
		games_preferences_page_set_immersive_mode ((GamesPreferencesPage*) self, g_value_get_boolean (value));
		break;
		case GAMES_PREFERENCES_PAGE_VIDEO_FILTER_ACTIVE_PROPERTY:
		games_preferences_page_video_set_filter_active (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}



