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

/*
 * Copyright 2017-2021 elementary, Inc. (https://elementary.io)
 * SPDX-License-Identifier: LGPL-3.0-or-later
 */

#include "granite-7.h"
#include <glib-object.h>
#include <gtk/gtk.h>
#include <glib.h>
#include <gio/gio.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_DEMO_PAGE (demo_page_get_type ())
#define DEMO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DEMO_PAGE, DemoPage))
#define DEMO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DEMO_PAGE, DemoPageClass))
#define IS_DEMO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DEMO_PAGE))
#define IS_DEMO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DEMO_PAGE))
#define DEMO_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DEMO_PAGE, DemoPageClass))

typedef struct _DemoPage DemoPage;
typedef struct _DemoPageClass DemoPageClass;
typedef struct _DemoPagePrivate DemoPagePrivate;

#define TYPE_DIALOGS_VIEW (dialogs_view_get_type ())
#define DIALOGS_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DIALOGS_VIEW, DialogsView))
#define DIALOGS_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DIALOGS_VIEW, DialogsViewClass))
#define IS_DIALOGS_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DIALOGS_VIEW))
#define IS_DIALOGS_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DIALOGS_VIEW))
#define DIALOGS_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DIALOGS_VIEW, DialogsViewClass))

typedef struct _DialogsView DialogsView;
typedef struct _DialogsViewClass DialogsViewClass;
typedef struct _DialogsViewPrivate DialogsViewPrivate;
enum  {
	DIALOGS_VIEW_0_PROPERTY,
	DIALOGS_VIEW_WINDOW_PROPERTY,
	DIALOGS_VIEW_NUM_PROPERTIES
};
static GParamSpec* dialogs_view_properties[DIALOGS_VIEW_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block3Data Block3Data;
typedef struct _Block4Data Block4Data;

struct _DemoPage {
	GraniteToolBox parent_instance;
	DemoPagePrivate * priv;
};

struct _DemoPageClass {
	GraniteToolBoxClass parent_class;
};

struct _DialogsView {
	DemoPage parent_instance;
	DialogsViewPrivate * priv;
};

struct _DialogsViewClass {
	DemoPageClass parent_class;
};

struct _DialogsViewPrivate {
	GtkWindow* _window;
	GraniteToast* toast;
};

struct _Block3Data {
	int _ref_count_;
	DialogsView* self;
	GraniteDialog* dialog;
};

struct _Block4Data {
	int _ref_count_;
	DialogsView* self;
	GraniteMessageDialog* message_dialog;
};

static gint DialogsView_private_offset;
static gpointer dialogs_view_parent_class = NULL;

VALA_EXTERN GType demo_page_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DemoPage, g_object_unref)
VALA_EXTERN GType dialogs_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsView, g_object_unref)
VALA_EXTERN GtkWindow* dialogs_view_get_window (DialogsView* self);
static void dialogs_view_set_window (DialogsView* self,
                              GtkWindow* value);
VALA_EXTERN DialogsView* dialogs_view_new (GtkWindow* window);
VALA_EXTERN DialogsView* dialogs_view_construct (GType object_type,
                                     GtkWindow* window);
static void dialogs_view_show_dialog (DialogsView* self);
static Block3Data* block3_data_ref (Block3Data* _data3_);
static void block3_data_unref (void * _userdata_);
static void __lambda18_ (Block3Data* _data3_,
                  gint response_id);
static void ___lambda18__gtk_dialog_response (GtkDialog* _sender,
                                       gint response_id,
                                       gpointer self);
static void dialogs_view_show_message_dialog (DialogsView* self);
static Block4Data* block4_data_ref (Block4Data* _data4_);
static void block4_data_unref (void * _userdata_);
static void __lambda19_ (Block4Data* _data4_,
                  gint response_id);
static void ___lambda19__gtk_dialog_response (GtkDialog* _sender,
                                       gint response_id,
                                       gpointer self);
static GObject * dialogs_view_constructor (GType type,
                                    guint n_construct_properties,
                                    GObjectConstructParam * construct_properties);
VALA_EXTERN void demo_page_set_child (DemoPage* self,
                          GtkWidget* value);
static void _dialogs_view_show_dialog_gtk_button_clicked (GtkButton* _sender,
                                                   gpointer self);
static void _dialogs_view_show_message_dialog_gtk_button_clicked (GtkButton* _sender,
                                                           gpointer self);
static void dialogs_view_finalize (GObject * obj);
static GType dialogs_view_get_type_once (void);
static void _vala_dialogs_view_get_property (GObject * object,
                                      guint property_id,
                                      GValue * value,
                                      GParamSpec * pspec);
static void _vala_dialogs_view_set_property (GObject * object,
                                      guint property_id,
                                      const GValue * value,
                                      GParamSpec * pspec);

static inline gpointer
dialogs_view_get_instance_private (DialogsView* self)
{
	return G_STRUCT_MEMBER_P (self, DialogsView_private_offset);
}

GtkWindow*
dialogs_view_get_window (DialogsView* self)
{
	GtkWindow* result;
	GtkWindow* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_window;
	result = _tmp0_;
	return result;
}

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

static void
dialogs_view_set_window (DialogsView* self,
                         GtkWindow* value)
{
	GtkWindow* old_value;
	g_return_if_fail (self != NULL);
	old_value = dialogs_view_get_window (self);
	if (old_value != value) {
		GtkWindow* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_window);
		self->priv->_window = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, dialogs_view_properties[DIALOGS_VIEW_WINDOW_PROPERTY]);
	}
}

DialogsView*
dialogs_view_construct (GType object_type,
                        GtkWindow* window)
{
	DialogsView * self = NULL;
	g_return_val_if_fail (window != NULL, NULL);
	self = (DialogsView*) g_object_new (object_type, "window", window, NULL);
	return self;
}

DialogsView*
dialogs_view_new (GtkWindow* window)
{
	return dialogs_view_construct (TYPE_DIALOGS_VIEW, window);
}

static Block3Data*
block3_data_ref (Block3Data* _data3_)
{
	g_atomic_int_inc (&_data3_->_ref_count_);
	return _data3_;
}

static void
block3_data_unref (void * _userdata_)
{
	Block3Data* _data3_;
	_data3_ = (Block3Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
		DialogsView* self;
		self = _data3_->self;
		_g_object_unref0 (_data3_->dialog);
		_g_object_unref0 (self);
		g_slice_free (Block3Data, _data3_);
	}
}

static void
__lambda18_ (Block3Data* _data3_,
             gint response_id)
{
	DialogsView* self;
	self = _data3_->self;
	if (response_id == ((gint) GTK_RESPONSE_ACCEPT)) {
		GraniteToast* _tmp0_;
		_tmp0_ = self->priv->toast;
		granite_toast_send_notification (_tmp0_);
	}
	gtk_window_destroy ((GtkWindow*) _data3_->dialog);
}

static void
___lambda18__gtk_dialog_response (GtkDialog* _sender,
                                  gint response_id,
                                  gpointer self)
{
	__lambda18_ (self, response_id);
}

static void
dialogs_view_show_dialog (DialogsView* self)
{
	Block3Data* _data3_;
	GraniteHeaderLabel* header = NULL;
	GraniteHeaderLabel* _tmp0_;
	GtkEntry* entry = NULL;
	GtkEntry* _tmp1_;
	GtkSwitch* gtk_switch = NULL;
	GtkSwitch* _tmp2_ = NULL;
	GtkGrid* layout = NULL;
	GtkGrid* _tmp3_ = NULL;
	GtkWindow* _tmp4_;
	GtkWindow* _tmp5_;
	GraniteDialog* _tmp6_ = NULL;
	GtkBox* _tmp7_;
	GtkWidget* suggested_button = NULL;
	GtkWidget* _tmp8_;
	GtkWidget* _tmp9_;
	g_return_if_fail (self != NULL);
	_data3_ = g_slice_new0 (Block3Data);
	_data3_->_ref_count_ = 1;
	_data3_->self = g_object_ref (self);
	_tmp0_ = granite_header_label_new ("Header");
	g_object_ref_sink (_tmp0_);
	header = _tmp0_;
	_tmp1_ = (GtkEntry*) gtk_entry_new ();
	g_object_ref_sink (_tmp1_);
	entry = _tmp1_;
	_tmp2_ = (GtkSwitch*) gtk_switch_new ();
	gtk_widget_set_halign ((GtkWidget*) _tmp2_, GTK_ALIGN_START);
	g_object_ref_sink (_tmp2_);
	gtk_switch = _tmp2_;
	_tmp3_ = (GtkGrid*) gtk_grid_new ();
	gtk_grid_set_row_spacing (_tmp3_, 12);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp3_, TRUE);
	g_object_ref_sink (_tmp3_);
	layout = _tmp3_;
	gtk_grid_attach (layout, (GtkWidget*) header, 0, 1, 1, 1);
	gtk_grid_attach (layout, (GtkWidget*) entry, 0, 2, 1, 1);
	gtk_grid_attach (layout, (GtkWidget*) gtk_switch, 0, 3, 1, 1);
	_tmp4_ = self->priv->_window;
	_tmp5_ = _g_object_ref0 (_tmp4_);
	_tmp6_ = granite_dialog_new ();
	gtk_window_set_modal ((GtkWindow*) _tmp6_, TRUE);
	gtk_window_set_transient_for ((GtkWindow*) _tmp6_, _tmp5_);
	_g_object_unref0 (_tmp5_);
	g_object_ref_sink (_tmp6_);
	_data3_->dialog = _tmp6_;
	_tmp7_ = gtk_dialog_get_content_area ((GtkDialog*) _data3_->dialog);
	gtk_box_append (_tmp7_, (GtkWidget*) layout);
	granite_dialog_add_button (_data3_->dialog, "Cancel", (gint) GTK_RESPONSE_CANCEL);
	_tmp8_ = granite_dialog_add_button (_data3_->dialog, "Suggested Action", (gint) GTK_RESPONSE_ACCEPT);
	_tmp9_ = _g_object_ref0 (_tmp8_);
	suggested_button = _tmp9_;
	gtk_widget_add_css_class (suggested_button, GRANITE_CSS_CLASS_SUGGESTED);
	g_signal_connect_data ((GtkDialog*) _data3_->dialog, "response", (GCallback) ___lambda18__gtk_dialog_response, block3_data_ref (_data3_), (GClosureNotify) block3_data_unref, 0);
	gtk_widget_show ((GtkWidget*) _data3_->dialog);
	_g_object_unref0 (suggested_button);
	_g_object_unref0 (layout);
	_g_object_unref0 (gtk_switch);
	_g_object_unref0 (entry);
	_g_object_unref0 (header);
	block3_data_unref (_data3_);
	_data3_ = NULL;
}

static Block4Data*
block4_data_ref (Block4Data* _data4_)
{
	g_atomic_int_inc (&_data4_->_ref_count_);
	return _data4_;
}

static void
block4_data_unref (void * _userdata_)
{
	Block4Data* _data4_;
	_data4_ = (Block4Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data4_->_ref_count_)) {
		DialogsView* self;
		self = _data4_->self;
		_g_object_unref0 (_data4_->message_dialog);
		_g_object_unref0 (self);
		g_slice_free (Block4Data, _data4_);
	}
}

static void
__lambda19_ (Block4Data* _data4_,
             gint response_id)
{
	DialogsView* self;
	self = _data4_->self;
	if (response_id == ((gint) GTK_RESPONSE_ACCEPT)) {
		GraniteToast* _tmp0_;
		_tmp0_ = self->priv->toast;
		granite_toast_send_notification (_tmp0_);
	}
	gtk_window_destroy ((GtkWindow*) _data4_->message_dialog);
}

static void
___lambda19__gtk_dialog_response (GtkDialog* _sender,
                                  gint response_id,
                                  gpointer self)
{
	__lambda19_ (self, response_id);
}

static void
dialogs_view_show_message_dialog (DialogsView* self)
{
	Block4Data* _data4_;
	GThemedIcon* _tmp0_;
	GThemedIcon* _tmp1_;
	GThemedIcon* _tmp2_;
	GtkWindow* _tmp3_;
	GtkWindow* _tmp4_;
	GraniteMessageDialog* _tmp5_ = NULL;
	GraniteMessageDialog* _tmp6_;
	GtkButton* suggested_button = NULL;
	GtkButton* _tmp7_;
	GtkCheckButton* custom_widget = NULL;
	GtkCheckButton* _tmp8_;
	GtkBox* _tmp9_;
	GtkBox* _tmp10_;
	g_return_if_fail (self != NULL);
	_data4_ = g_slice_new0 (Block4Data);
	_data4_->_ref_count_ = 1;
	_data4_->self = g_object_ref (self);
	_tmp0_ = (GThemedIcon*) g_themed_icon_new ("phone");
	_tmp1_ = _tmp0_;
	_tmp2_ = (GThemedIcon*) g_themed_icon_new ("dialog-information");
	_tmp3_ = self->priv->_window;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_tmp5_ = granite_message_dialog_new ("Basic information and a suggestion", "Further details, including information that explains any unobvious con" \
"sequences of actions.", (GIcon*) _tmp1_, GTK_BUTTONS_CANCEL);
	granite_message_dialog_set_badge_icon (_tmp5_, (GIcon*) _tmp2_);
	_g_object_unref0 (_tmp2_);
	gtk_window_set_modal ((GtkWindow*) _tmp5_, TRUE);
	gtk_window_set_transient_for ((GtkWindow*) _tmp5_, _tmp4_);
	_g_object_unref0 (_tmp4_);
	g_object_ref_sink (_tmp5_);
	_tmp6_ = _tmp5_;
	_g_object_unref0 (_tmp1_);
	_data4_->message_dialog = _tmp6_;
	_tmp7_ = (GtkButton*) gtk_button_new_with_label ("Suggested Action");
	g_object_ref_sink (_tmp7_);
	suggested_button = _tmp7_;
	gtk_widget_add_css_class ((GtkWidget*) suggested_button, GRANITE_CSS_CLASS_SUGGESTED);
	gtk_dialog_add_action_widget ((GtkDialog*) _data4_->message_dialog, (GtkWidget*) suggested_button, (gint) GTK_RESPONSE_ACCEPT);
	_tmp8_ = (GtkCheckButton*) gtk_check_button_new_with_label ("Custom widget");
	g_object_ref_sink (_tmp8_);
	custom_widget = _tmp8_;
	granite_message_dialog_show_error_details (_data4_->message_dialog, "The details of a possible error.");
	_tmp9_ = granite_message_dialog_get_custom_bin (_data4_->message_dialog);
	_tmp10_ = _tmp9_;
	gtk_box_append (_tmp10_, (GtkWidget*) custom_widget);
	g_signal_connect_data ((GtkDialog*) _data4_->message_dialog, "response", (GCallback) ___lambda19__gtk_dialog_response, block4_data_ref (_data4_), (GClosureNotify) block4_data_unref, 0);
	gtk_widget_show ((GtkWidget*) _data4_->message_dialog);
	_g_object_unref0 (custom_widget);
	_g_object_unref0 (suggested_button);
	block4_data_unref (_data4_);
	_data4_ = NULL;
}

static void
_dialogs_view_show_dialog_gtk_button_clicked (GtkButton* _sender,
                                              gpointer self)
{
	dialogs_view_show_dialog ((DialogsView*) self);
}

static void
_dialogs_view_show_message_dialog_gtk_button_clicked (GtkButton* _sender,
                                                      gpointer self)
{
	dialogs_view_show_message_dialog ((DialogsView*) self);
}

static GObject *
dialogs_view_constructor (GType type,
                          guint n_construct_properties,
                          GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	DialogsView * self;
	GtkButton* dialog_button = NULL;
	GtkButton* _tmp0_;
	GtkButton* message_button = NULL;
	GtkButton* _tmp1_;
	GraniteToast* _tmp2_;
	GtkGrid* grid = NULL;
	GtkGrid* _tmp3_ = NULL;
	GtkGrid* _tmp4_;
	GtkButton* _tmp5_;
	GtkGrid* _tmp6_;
	GtkButton* _tmp7_;
	GtkOverlay* overlay = NULL;
	GtkGrid* _tmp8_;
	GtkWidget* _tmp9_;
	GtkOverlay* _tmp10_ = NULL;
	GtkOverlay* _tmp11_;
	GraniteToast* _tmp12_;
	GtkOverlay* _tmp13_;
	GtkButton* _tmp14_;
	GtkButton* _tmp15_;
	parent_class = G_OBJECT_CLASS (dialogs_view_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DIALOGS_VIEW, DialogsView);
	_tmp0_ = (GtkButton*) gtk_button_new_with_label ("Show Dialog");
	g_object_ref_sink (_tmp0_);
	dialog_button = _tmp0_;
	_tmp1_ = (GtkButton*) gtk_button_new_with_label ("Show MessageDialog");
	g_object_ref_sink (_tmp1_);
	message_button = _tmp1_;
	_tmp2_ = granite_toast_new ("Did something");
	g_object_ref_sink (_tmp2_);
	_g_object_unref0 (self->priv->toast);
	self->priv->toast = _tmp2_;
	_tmp3_ = (GtkGrid*) gtk_grid_new ();
	gtk_widget_set_hexpand ((GtkWidget*) _tmp3_, TRUE);
	gtk_widget_set_halign ((GtkWidget*) _tmp3_, GTK_ALIGN_CENTER);
	gtk_widget_set_valign ((GtkWidget*) _tmp3_, GTK_ALIGN_CENTER);
	gtk_grid_set_row_spacing (_tmp3_, 12);
	g_object_ref_sink (_tmp3_);
	grid = _tmp3_;
	_tmp4_ = grid;
	_tmp5_ = dialog_button;
	gtk_grid_attach (_tmp4_, (GtkWidget*) _tmp5_, 0, 1, 1, 1);
	_tmp6_ = grid;
	_tmp7_ = message_button;
	gtk_grid_attach (_tmp6_, (GtkWidget*) _tmp7_, 0, 2, 1, 1);
	_tmp8_ = grid;
	_tmp9_ = _g_object_ref0 ((GtkWidget*) _tmp8_);
	_tmp10_ = (GtkOverlay*) gtk_overlay_new ();
	gtk_overlay_set_child (_tmp10_, _tmp9_);
	_g_object_unref0 (_tmp9_);
	g_object_ref_sink (_tmp10_);
	overlay = _tmp10_;
	_tmp11_ = overlay;
	_tmp12_ = self->priv->toast;
	gtk_overlay_add_overlay (_tmp11_, (GtkWidget*) _tmp12_);
	_tmp13_ = overlay;
	demo_page_set_child ((DemoPage*) self, (GtkWidget*) _tmp13_);
	_tmp14_ = dialog_button;
	g_signal_connect_object (_tmp14_, "clicked", (GCallback) _dialogs_view_show_dialog_gtk_button_clicked, self, 0);
	_tmp15_ = message_button;
	g_signal_connect_object (_tmp15_, "clicked", (GCallback) _dialogs_view_show_message_dialog_gtk_button_clicked, self, 0);
	_g_object_unref0 (overlay);
	_g_object_unref0 (grid);
	_g_object_unref0 (message_button);
	_g_object_unref0 (dialog_button);
	return obj;
}

static void
dialogs_view_class_init (DialogsViewClass * klass,
                         gpointer klass_data)
{
	dialogs_view_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DialogsView_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_dialogs_view_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_dialogs_view_set_property;
	G_OBJECT_CLASS (klass)->constructor = dialogs_view_constructor;
	G_OBJECT_CLASS (klass)->finalize = dialogs_view_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DIALOGS_VIEW_WINDOW_PROPERTY, dialogs_view_properties[DIALOGS_VIEW_WINDOW_PROPERTY] = g_param_spec_object ("window", "window", "window", gtk_window_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}

static void
dialogs_view_instance_init (DialogsView * self,
                            gpointer klass)
{
	self->priv = dialogs_view_get_instance_private (self);
}

static void
dialogs_view_finalize (GObject * obj)
{
	DialogsView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DIALOGS_VIEW, DialogsView);
	_g_object_unref0 (self->priv->_window);
	_g_object_unref0 (self->priv->toast);
	G_OBJECT_CLASS (dialogs_view_parent_class)->finalize (obj);
}

static GType
dialogs_view_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DialogsViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dialogs_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DialogsView), 0, (GInstanceInitFunc) dialogs_view_instance_init, NULL };
	GType dialogs_view_type_id;
	dialogs_view_type_id = g_type_register_static (TYPE_DEMO_PAGE, "DialogsView", &g_define_type_info, 0);
	DialogsView_private_offset = g_type_add_instance_private (dialogs_view_type_id, sizeof (DialogsViewPrivate));
	return dialogs_view_type_id;
}

GType
dialogs_view_get_type (void)
{
	static volatile gsize dialogs_view_type_id__once = 0;
	if (g_once_init_enter (&dialogs_view_type_id__once)) {
		GType dialogs_view_type_id;
		dialogs_view_type_id = dialogs_view_get_type_once ();
		g_once_init_leave (&dialogs_view_type_id__once, dialogs_view_type_id);
	}
	return dialogs_view_type_id__once;
}

static void
_vala_dialogs_view_get_property (GObject * object,
                                 guint property_id,
                                 GValue * value,
                                 GParamSpec * pspec)
{
	DialogsView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_DIALOGS_VIEW, DialogsView);
	switch (property_id) {
		case DIALOGS_VIEW_WINDOW_PROPERTY:
		g_value_set_object (value, dialogs_view_get_window (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_dialogs_view_set_property (GObject * object,
                                 guint property_id,
                                 const GValue * value,
                                 GParamSpec * pspec)
{
	DialogsView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_DIALOGS_VIEW, DialogsView);
	switch (property_id) {
		case DIALOGS_VIEW_WINDOW_PROPERTY:
		dialogs_view_set_window (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

