/* RestoreToolbarView.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from RestoreToolbarView.vala, do not modify */

/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 2 -*-
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 * SPDX-FileCopyrightText: Michael Terry
 */

#include <adwaita.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <glib.h>
#include "deja.h"
#include <stdlib.h>
#include <string.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define TYPE_RESTORE_TOOLBAR_VIEW (restore_toolbar_view_get_type ())
#define RESTORE_TOOLBAR_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_RESTORE_TOOLBAR_VIEW, RestoreToolbarView))
#define RESTORE_TOOLBAR_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_RESTORE_TOOLBAR_VIEW, RestoreToolbarViewClass))
#define IS_RESTORE_TOOLBAR_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_RESTORE_TOOLBAR_VIEW))
#define IS_RESTORE_TOOLBAR_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_RESTORE_TOOLBAR_VIEW))
#define RESTORE_TOOLBAR_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_RESTORE_TOOLBAR_VIEW, RestoreToolbarViewClass))

typedef struct _RestoreToolbarView RestoreToolbarView;
typedef struct _RestoreToolbarViewClass RestoreToolbarViewClass;
typedef struct _RestoreToolbarViewPrivate RestoreToolbarViewPrivate;

#define TYPE_BROWSER (browser_get_type ())
#define BROWSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BROWSER, Browser))
#define BROWSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BROWSER, BrowserClass))
#define IS_BROWSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BROWSER))
#define IS_BROWSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BROWSER))
#define BROWSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BROWSER, BrowserClass))

typedef struct _Browser Browser;
typedef struct _BrowserClass BrowserClass;
enum  {
	RESTORE_TOOLBAR_VIEW_0_PROPERTY,
	RESTORE_TOOLBAR_VIEW_CONTENT_PROPERTY,
	RESTORE_TOOLBAR_VIEW_BROWSER_PROPERTY,
	RESTORE_TOOLBAR_VIEW_THIN_MODE_PROPERTY,
	RESTORE_TOOLBAR_VIEW_NUM_PROPERTIES
};
static GParamSpec* restore_toolbar_view_properties[RESTORE_TOOLBAR_VIEW_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
enum  {
	RESTORE_TOOLBAR_VIEW_RESTORE_SIGNAL,
	RESTORE_TOOLBAR_VIEW_NUM_SIGNALS
};
static guint restore_toolbar_view_signals[RESTORE_TOOLBAR_VIEW_NUM_SIGNALS] = {0};

struct _RestoreToolbarView {
	AdwBin parent_instance;
	RestoreToolbarViewPrivate * priv;
};

struct _RestoreToolbarViewClass {
	AdwBinClass parent_class;
};

struct _RestoreToolbarViewPrivate {
	GtkWidget* _content;
	Browser* _browser;
	gboolean _thin_mode;
	AdwToolbarView* view;
	GtkButton* restore_button;
	GtkSearchBar* search_bar;
	GtkSearchEntry* search_entry;
	GtkActionBar* action_bar;
};

static gint RestoreToolbarView_private_offset;
static gpointer restore_toolbar_view_parent_class = NULL;

VALA_EXTERN GType restore_toolbar_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (RestoreToolbarView, g_object_unref)
VALA_EXTERN GType browser_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Browser, g_object_unref)
VALA_EXTERN void restore_toolbar_view_activate_search (RestoreToolbarView* self);
static void restore_toolbar_view_new_browser (RestoreToolbarView* self);
VALA_EXTERN Browser* restore_toolbar_view_get_browser (RestoreToolbarView* self);
static void restore_toolbar_view_update_restore_button (RestoreToolbarView* self);
static void _restore_toolbar_view_update_restore_button_g_object_notify (GObject* _sender,
                                                                  GParamSpec* pspec,
                                                                  gpointer self);
VALA_EXTERN gboolean browser_get_has_selection (Browser* self);
static void restore_toolbar_view_on_search_changed (RestoreToolbarView* self);
VALA_EXTERN void browser_set_search_filter (Browser* self,
                                const gchar* value);
static void _restore_toolbar_view_on_search_changed_gtk_search_entry_search_changed (GtkSearchEntry* _sender,
                                                                              gpointer self);
static void restore_toolbar_view_emit_restore (RestoreToolbarView* self);
static void _restore_toolbar_view_emit_restore_gtk_button_clicked (GtkButton* _sender,
                                                            gpointer self);
static void restore_toolbar_view_on_thin_mode_changed (RestoreToolbarView* self);
VALA_EXTERN gboolean restore_toolbar_view_get_thin_mode (RestoreToolbarView* self);
static void _restore_toolbar_view_on_thin_mode_changed_g_object_notify (GObject* _sender,
                                                                 GParamSpec* pspec,
                                                                 gpointer self);
VALA_EXTERN RestoreToolbarView* restore_toolbar_view_new (void);
VALA_EXTERN RestoreToolbarView* restore_toolbar_view_construct (GType object_type);
VALA_EXTERN GtkWidget* restore_toolbar_view_get_content (RestoreToolbarView* self);
VALA_EXTERN void restore_toolbar_view_set_content (RestoreToolbarView* self,
                                       GtkWidget* value);
VALA_EXTERN void restore_toolbar_view_set_browser (RestoreToolbarView* self,
                                       Browser* value);
VALA_EXTERN void restore_toolbar_view_set_thin_mode (RestoreToolbarView* self,
                                         gboolean value);
static GObject * restore_toolbar_view_constructor (GType type,
                                            guint n_construct_properties,
                                            GObjectConstructParam * construct_properties);
static void _restore_toolbar_view_new_browser_g_object_notify (GObject* _sender,
                                                        GParamSpec* pspec,
                                                        gpointer self);
static void restore_toolbar_view_finalize (GObject * obj);
static GType restore_toolbar_view_get_type_once (void);
static void _vala_restore_toolbar_view_get_property (GObject * object,
                                              guint property_id,
                                              GValue * value,
                                              GParamSpec * pspec);
static void _vala_restore_toolbar_view_set_property (GObject * object,
                                              guint property_id,
                                              const GValue * value,
                                              GParamSpec * pspec);

static inline gpointer
restore_toolbar_view_get_instance_private (RestoreToolbarView* self)
{
	return G_STRUCT_MEMBER_P (self, RestoreToolbarView_private_offset);
}

void
restore_toolbar_view_activate_search (RestoreToolbarView* self)
{
	GtkSearchBar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->search_bar;
	g_object_set (_tmp0_, "search-mode-enabled", TRUE, NULL);
}

static void
_restore_toolbar_view_update_restore_button_g_object_notify (GObject* _sender,
                                                             GParamSpec* pspec,
                                                             gpointer self)
{
	restore_toolbar_view_update_restore_button ((RestoreToolbarView*) self);
}

static void
restore_toolbar_view_new_browser (RestoreToolbarView* self)
{
	Browser* _tmp0_;
	Browser* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_browser;
	if (_tmp0_ == NULL) {
		return;
	}
	_tmp1_ = self->priv->_browser;
	g_signal_connect_object ((GObject*) _tmp1_, "notify::has-selection", (GCallback) _restore_toolbar_view_update_restore_button_g_object_notify, self, 0);
	restore_toolbar_view_update_restore_button (self);
}

static void
restore_toolbar_view_update_restore_button (RestoreToolbarView* self)
{
	gboolean active_op = FALSE;
	DejaDupOperationWatcher* _tmp0_;
	DejaDupOperationWatcher* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_ = FALSE;
	Browser* _tmp6_;
	gboolean has_selection = FALSE;
	gboolean _tmp10_ = FALSE;
	GtkButton* _tmp11_;
	g_return_if_fail (self != NULL);
	_tmp0_ = deja_dup_operation_watcher_get_instance ();
	_tmp1_ = _tmp0_;
	_tmp2_ = deja_dup_operation_watcher_get_active (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = _tmp3_;
	_g_object_unref0 (_tmp1_);
	active_op = _tmp4_;
	_tmp6_ = self->priv->_browser;
	if (_tmp6_ != NULL) {
		Browser* _tmp7_;
		gboolean _tmp8_;
		gboolean _tmp9_;
		_tmp7_ = self->priv->_browser;
		_tmp8_ = browser_get_has_selection (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp5_ = _tmp9_;
	} else {
		_tmp5_ = FALSE;
	}
	has_selection = _tmp5_;
	if (!active_op) {
		_tmp10_ = has_selection;
	} else {
		_tmp10_ = FALSE;
	}
	_tmp11_ = self->priv->restore_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp11_, _tmp10_);
}

static void
restore_toolbar_view_on_search_changed (RestoreToolbarView* self)
{
	Browser* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_browser;
	if (_tmp0_ != NULL) {
		Browser* _tmp1_;
		GtkSearchEntry* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		_tmp1_ = self->priv->_browser;
		_tmp2_ = self->priv->search_entry;
		_tmp3_ = gtk_editable_get_text ((GtkEditable*) _tmp2_);
		_tmp4_ = _tmp3_;
		browser_set_search_filter (_tmp1_, _tmp4_);
	}
}

static void
_restore_toolbar_view_on_search_changed_gtk_search_entry_search_changed (GtkSearchEntry* _sender,
                                                                         gpointer self)
{
	restore_toolbar_view_on_search_changed ((RestoreToolbarView*) self);
}

static void
restore_toolbar_view_emit_restore (RestoreToolbarView* self)
{
	g_return_if_fail (self != NULL);
	g_signal_emit (self, restore_toolbar_view_signals[RESTORE_TOOLBAR_VIEW_RESTORE_SIGNAL], 0);
}

static void
_restore_toolbar_view_emit_restore_gtk_button_clicked (GtkButton* _sender,
                                                       gpointer self)
{
	restore_toolbar_view_emit_restore ((RestoreToolbarView*) self);
}

static void
restore_toolbar_view_on_thin_mode_changed (RestoreToolbarView* self)
{
	AdwToolbarView* _tmp0_;
	GtkSearchBar* _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->view;
	_tmp1_ = self->priv->search_bar;
	adw_toolbar_view_remove (_tmp0_, (GtkWidget*) _tmp1_);
	_tmp2_ = self->priv->_thin_mode;
	if (_tmp2_) {
		AdwToolbarView* _tmp3_;
		GtkSearchBar* _tmp4_;
		AdwToolbarView* _tmp5_;
		GtkActionBar* _tmp6_;
		AdwToolbarView* _tmp7_;
		GtkActionBar* _tmp8_;
		_tmp3_ = self->priv->view;
		_tmp4_ = self->priv->search_bar;
		adw_toolbar_view_add_bottom_bar (_tmp3_, (GtkWidget*) _tmp4_);
		_tmp5_ = self->priv->view;
		_tmp6_ = self->priv->action_bar;
		adw_toolbar_view_remove (_tmp5_, (GtkWidget*) _tmp6_);
		_tmp7_ = self->priv->view;
		_tmp8_ = self->priv->action_bar;
		adw_toolbar_view_add_bottom_bar (_tmp7_, (GtkWidget*) _tmp8_);
	} else {
		AdwToolbarView* _tmp9_;
		GtkSearchBar* _tmp10_;
		_tmp9_ = self->priv->view;
		_tmp10_ = self->priv->search_bar;
		adw_toolbar_view_add_top_bar (_tmp9_, (GtkWidget*) _tmp10_);
	}
}

static void
_restore_toolbar_view_on_thin_mode_changed_g_object_notify (GObject* _sender,
                                                            GParamSpec* pspec,
                                                            gpointer self)
{
	restore_toolbar_view_on_thin_mode_changed ((RestoreToolbarView*) self);
}

RestoreToolbarView*
restore_toolbar_view_construct (GType object_type)
{
	RestoreToolbarView * self = NULL;
	self = (RestoreToolbarView*) g_object_new (object_type, NULL);
	return self;
}

RestoreToolbarView*
restore_toolbar_view_new (void)
{
	return restore_toolbar_view_construct (TYPE_RESTORE_TOOLBAR_VIEW);
}

GtkWidget*
restore_toolbar_view_get_content (RestoreToolbarView* self)
{
	GtkWidget* result;
	GtkWidget* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_content;
	result = _tmp0_;
	return result;
}

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

void
restore_toolbar_view_set_content (RestoreToolbarView* self,
                                  GtkWidget* value)
{
	GtkWidget* old_value;
	g_return_if_fail (self != NULL);
	old_value = restore_toolbar_view_get_content (self);
	if (old_value != value) {
		GtkWidget* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_content);
		self->priv->_content = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, restore_toolbar_view_properties[RESTORE_TOOLBAR_VIEW_CONTENT_PROPERTY]);
	}
}

Browser*
restore_toolbar_view_get_browser (RestoreToolbarView* self)
{
	Browser* result;
	Browser* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_browser;
	result = _tmp0_;
	return result;
}

void
restore_toolbar_view_set_browser (RestoreToolbarView* self,
                                  Browser* value)
{
	Browser* old_value;
	g_return_if_fail (self != NULL);
	old_value = restore_toolbar_view_get_browser (self);
	if (old_value != value) {
		Browser* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_browser);
		self->priv->_browser = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, restore_toolbar_view_properties[RESTORE_TOOLBAR_VIEW_BROWSER_PROPERTY]);
	}
}

gboolean
restore_toolbar_view_get_thin_mode (RestoreToolbarView* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_thin_mode;
	return result;
}

void
restore_toolbar_view_set_thin_mode (RestoreToolbarView* self,
                                    gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = restore_toolbar_view_get_thin_mode (self);
	if (old_value != value) {
		self->priv->_thin_mode = value;
		g_object_notify_by_pspec ((GObject *) self, restore_toolbar_view_properties[RESTORE_TOOLBAR_VIEW_THIN_MODE_PROPERTY]);
	}
}

static void
_restore_toolbar_view_new_browser_g_object_notify (GObject* _sender,
                                                   GParamSpec* pspec,
                                                   gpointer self)
{
	restore_toolbar_view_new_browser ((RestoreToolbarView*) self);
}

static GObject *
restore_toolbar_view_constructor (GType type,
                                  guint n_construct_properties,
                                  GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	RestoreToolbarView * self;
	DejaDupOperationWatcher* op_watcher = NULL;
	DejaDupOperationWatcher* _tmp0_;
	DejaDupOperationWatcher* _tmp1_;
	parent_class = G_OBJECT_CLASS (restore_toolbar_view_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_RESTORE_TOOLBAR_VIEW, RestoreToolbarView);
	_tmp0_ = deja_dup_operation_watcher_get_instance ();
	op_watcher = _tmp0_;
	_tmp1_ = op_watcher;
	g_signal_connect_object ((GObject*) _tmp1_, "notify::active", (GCallback) _restore_toolbar_view_update_restore_button_g_object_notify, self, 0);
	restore_toolbar_view_update_restore_button (self);
	g_signal_connect_object ((GObject*) self, "notify::browser", (GCallback) _restore_toolbar_view_new_browser_g_object_notify, self, 0);
	_g_object_unref0 (op_watcher);
	return obj;
}

static void
restore_toolbar_view_class_init (RestoreToolbarViewClass * klass,
                                 gpointer klass_data)
{
	restore_toolbar_view_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &RestoreToolbarView_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_restore_toolbar_view_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_restore_toolbar_view_set_property;
	G_OBJECT_CLASS (klass)->constructor = restore_toolbar_view_constructor;
	G_OBJECT_CLASS (klass)->finalize = restore_toolbar_view_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), RESTORE_TOOLBAR_VIEW_CONTENT_PROPERTY, restore_toolbar_view_properties[RESTORE_TOOLBAR_VIEW_CONTENT_PROPERTY] = g_param_spec_object ("content", "content", "content", gtk_widget_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), RESTORE_TOOLBAR_VIEW_BROWSER_PROPERTY, restore_toolbar_view_properties[RESTORE_TOOLBAR_VIEW_BROWSER_PROPERTY] = g_param_spec_object ("browser", "browser", "browser", TYPE_BROWSER, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), RESTORE_TOOLBAR_VIEW_THIN_MODE_PROPERTY, restore_toolbar_view_properties[RESTORE_TOOLBAR_VIEW_THIN_MODE_PROPERTY] = g_param_spec_boolean ("thin-mode", "thin-mode", "thin-mode", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/DejaDup/RestoreToolbarView.ui");
	restore_toolbar_view_signals[RESTORE_TOOLBAR_VIEW_RESTORE_SIGNAL] = g_signal_new ("restore", TYPE_RESTORE_TOOLBAR_VIEW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "view", FALSE, RestoreToolbarView_private_offset + G_STRUCT_OFFSET (RestoreToolbarViewPrivate, view));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "restore_button", FALSE, RestoreToolbarView_private_offset + G_STRUCT_OFFSET (RestoreToolbarViewPrivate, restore_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "search_bar", FALSE, RestoreToolbarView_private_offset + G_STRUCT_OFFSET (RestoreToolbarViewPrivate, search_bar));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "search_entry", FALSE, RestoreToolbarView_private_offset + G_STRUCT_OFFSET (RestoreToolbarViewPrivate, search_entry));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "action_bar", FALSE, RestoreToolbarView_private_offset + G_STRUCT_OFFSET (RestoreToolbarViewPrivate, action_bar));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_search_changed", G_CALLBACK(_restore_toolbar_view_on_search_changed_gtk_search_entry_search_changed));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "emit_restore", G_CALLBACK(_restore_toolbar_view_emit_restore_gtk_button_clicked));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_thin_mode_changed", G_CALLBACK(_restore_toolbar_view_on_thin_mode_changed_g_object_notify));
}

static void
restore_toolbar_view_instance_init (RestoreToolbarView * self,
                                    gpointer klass)
{
	self->priv = restore_toolbar_view_get_instance_private (self);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
restore_toolbar_view_finalize (GObject * obj)
{
	RestoreToolbarView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_RESTORE_TOOLBAR_VIEW, RestoreToolbarView);
	_g_object_unref0 (self->priv->_content);
	_g_object_unref0 (self->priv->_browser);
	G_OBJECT_CLASS (restore_toolbar_view_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
restore_toolbar_view_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (RestoreToolbarViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) restore_toolbar_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RestoreToolbarView), 0, (GInstanceInitFunc) restore_toolbar_view_instance_init, NULL };
	GType restore_toolbar_view_type_id;
	restore_toolbar_view_type_id = g_type_register_static (adw_bin_get_type (), "RestoreToolbarView", &g_define_type_info, 0);
	RestoreToolbarView_private_offset = g_type_add_instance_private (restore_toolbar_view_type_id, sizeof (RestoreToolbarViewPrivate));
	return restore_toolbar_view_type_id;
}

GType
restore_toolbar_view_get_type (void)
{
	static gsize restore_toolbar_view_type_id__once = 0;
	if (g_once_init_enter (&restore_toolbar_view_type_id__once)) {
		GType restore_toolbar_view_type_id;
		restore_toolbar_view_type_id = restore_toolbar_view_get_type_once ();
		g_once_init_leave (&restore_toolbar_view_type_id__once, restore_toolbar_view_type_id);
	}
	return restore_toolbar_view_type_id__once;
}

static void
_vala_restore_toolbar_view_get_property (GObject * object,
                                         guint property_id,
                                         GValue * value,
                                         GParamSpec * pspec)
{
	RestoreToolbarView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_RESTORE_TOOLBAR_VIEW, RestoreToolbarView);
	switch (property_id) {
		case RESTORE_TOOLBAR_VIEW_CONTENT_PROPERTY:
		g_value_set_object (value, restore_toolbar_view_get_content (self));
		break;
		case RESTORE_TOOLBAR_VIEW_BROWSER_PROPERTY:
		g_value_set_object (value, restore_toolbar_view_get_browser (self));
		break;
		case RESTORE_TOOLBAR_VIEW_THIN_MODE_PROPERTY:
		g_value_set_boolean (value, restore_toolbar_view_get_thin_mode (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_restore_toolbar_view_set_property (GObject * object,
                                         guint property_id,
                                         const GValue * value,
                                         GParamSpec * pspec)
{
	RestoreToolbarView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_RESTORE_TOOLBAR_VIEW, RestoreToolbarView);
	switch (property_id) {
		case RESTORE_TOOLBAR_VIEW_CONTENT_PROPERTY:
		restore_toolbar_view_set_content (self, g_value_get_object (value));
		break;
		case RESTORE_TOOLBAR_VIEW_BROWSER_PROPERTY:
		restore_toolbar_view_set_browser (self, g_value_get_object (value));
		break;
		case RESTORE_TOOLBAR_VIEW_THIN_MODE_PROPERTY:
		restore_toolbar_view_set_thin_mode (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

