/* PortalDialog.c generated by valac 0.56.19, the Vala compiler
 * generated from PortalDialog.vala, do not modify */

/*
 * SPDX-FileCopyrightText: 2026 elementary, Inc. (https://elementary.io)
 * SPDX-License-Identifier: LGPL-2.1-or-later
 */

#include <gtk/gtk.h>
#include <pantheon-wayland.h>
#include <glib-object.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <granite-7.h>
#include <gdk/gdk.h>
#include <glib/gi18n-lib.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 AG_TYPE_PORTAL_DIALOG (ag_portal_dialog_get_type ())
#define AG_PORTAL_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), AG_TYPE_PORTAL_DIALOG, AgPortalDialog))
#define AG_PORTAL_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), AG_TYPE_PORTAL_DIALOG, AgPortalDialogClass))
#define AG_IS_PORTAL_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AG_TYPE_PORTAL_DIALOG))
#define AG_IS_PORTAL_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), AG_TYPE_PORTAL_DIALOG))
#define AG_PORTAL_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AG_TYPE_PORTAL_DIALOG, AgPortalDialogClass))

typedef struct _AgPortalDialog AgPortalDialog;
typedef struct _AgPortalDialogClass AgPortalDialogClass;
typedef struct _AgPortalDialogPrivate AgPortalDialogPrivate;
typedef enum  {
	AG_PORTAL_DIALOG_ACTION_TYPE_SUGGESTED,
	AG_PORTAL_DIALOG_ACTION_TYPE_DESTRUCTIVE
} AgPortalDialogActionType;

#define AG_PORTAL_DIALOG_TYPE_ACTION_TYPE (ag_portal_dialog_action_type_get_type ())
enum  {
	AG_PORTAL_DIALOG_0_PROPERTY,
	AG_PORTAL_DIALOG_PRIMARY_ICON_PROPERTY,
	AG_PORTAL_DIALOG_SECONDARY_ICON_PROPERTY,
	AG_PORTAL_DIALOG_SECONDARY_TEXT_PROPERTY,
	AG_PORTAL_DIALOG_CONTENT_PROPERTY,
	AG_PORTAL_DIALOG_CANCEL_LABEL_PROPERTY,
	AG_PORTAL_DIALOG_ALLOW_LABEL_PROPERTY,
	AG_PORTAL_DIALOG_FORM_VALID_PROPERTY,
	AG_PORTAL_DIALOG_ACTION_TYPE_PROPERTY,
	AG_PORTAL_DIALOG_PARENT_HANDLE_PROPERTY,
	AG_PORTAL_DIALOG_NUM_PROPERTIES
};
static GParamSpec* ag_portal_dialog_properties[AG_PORTAL_DIALOG_NUM_PROPERTIES];
typedef enum  {
	AG_PORTAL_DIALOG_RESPONSE_TYPE_ALLOW,
	AG_PORTAL_DIALOG_RESPONSE_TYPE_CANCEL,
	AG_PORTAL_DIALOG_RESPONSE_TYPE_DELETE_EVENT
} AgPortalDialogResponseType;

#define AG_PORTAL_DIALOG_TYPE_RESPONSE_TYPE (ag_portal_dialog_response_type_get_type ())
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _Block5Data Block5Data;
enum  {
	AG_PORTAL_DIALOG_RESPONSE_SIGNAL,
	AG_PORTAL_DIALOG_NUM_SIGNALS
};
static guint ag_portal_dialog_signals[AG_PORTAL_DIALOG_NUM_SIGNALS] = {0};

struct _AgPortalDialog {
	GtkWindow parent_instance;
	AgPortalDialogPrivate * priv;
};

struct _AgPortalDialogClass {
	GtkWindowClass parent_class;
};

struct _AgPortalDialogPrivate {
	GIcon* _primary_icon;
	GIcon* _secondary_icon;
	gchar* _secondary_text;
	GtkWidget* _content;
	gchar* _cancel_label;
	gchar* _allow_label;
	gboolean _form_valid;
	AgPortalDialogActionType _action_type;
	gchar* _parent_handle;
	GraniteBox* button_box;
};

struct _Block5Data {
	int _ref_count_;
	AgPortalDialog* self;
	GtkButton* cancel_button;
	GtkButton* allow_button;
};

static gint AgPortalDialog_private_offset;
static gpointer ag_portal_dialog_parent_class = NULL;
static PantheonWaylandExtendedBehaviorIface * ag_portal_dialog_pantheon_wayland_extended_behavior_parent_iface = NULL;

VALA_EXTERN GType ag_portal_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (AgPortalDialog, g_object_unref)
VALA_EXTERN GType ag_portal_dialog_action_type_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType ag_portal_dialog_response_type_get_type (void) G_GNUC_CONST ;
VALA_EXTERN guint32 ag_portal_dialog_response_type_to_id (AgPortalDialogResponseType self);
static void ag_portal_dialog_on_realize (AgPortalDialog* self);
VALA_EXTERN AgPortalDialog* ag_portal_dialog_new (void);
VALA_EXTERN AgPortalDialog* ag_portal_dialog_construct (GType object_type);
VALA_EXTERN GIcon* ag_portal_dialog_get_primary_icon (AgPortalDialog* self);
VALA_EXTERN void ag_portal_dialog_set_primary_icon (AgPortalDialog* self,
                                        GIcon* value);
VALA_EXTERN GIcon* ag_portal_dialog_get_secondary_icon (AgPortalDialog* self);
VALA_EXTERN void ag_portal_dialog_set_secondary_icon (AgPortalDialog* self,
                                          GIcon* value);
VALA_EXTERN const gchar* ag_portal_dialog_get_secondary_text (AgPortalDialog* self);
VALA_EXTERN void ag_portal_dialog_set_secondary_text (AgPortalDialog* self,
                                          const gchar* value);
VALA_EXTERN GtkWidget* ag_portal_dialog_get_content (AgPortalDialog* self);
VALA_EXTERN void ag_portal_dialog_set_content (AgPortalDialog* self,
                                   GtkWidget* value);
VALA_EXTERN const gchar* ag_portal_dialog_get_cancel_label (AgPortalDialog* self);
VALA_EXTERN void ag_portal_dialog_set_cancel_label (AgPortalDialog* self,
                                        const gchar* value);
VALA_EXTERN const gchar* ag_portal_dialog_get_allow_label (AgPortalDialog* self);
VALA_EXTERN void ag_portal_dialog_set_allow_label (AgPortalDialog* self,
                                       const gchar* value);
VALA_EXTERN gboolean ag_portal_dialog_get_form_valid (AgPortalDialog* self);
VALA_EXTERN void ag_portal_dialog_set_form_valid (AgPortalDialog* self,
                                      gboolean value);
VALA_EXTERN AgPortalDialogActionType ag_portal_dialog_get_action_type (AgPortalDialog* self);
VALA_EXTERN void ag_portal_dialog_set_action_type (AgPortalDialog* self,
                                       AgPortalDialogActionType value);
VALA_EXTERN const gchar* ag_portal_dialog_get_parent_handle (AgPortalDialog* self);
VALA_EXTERN void ag_portal_dialog_set_parent_handle (AgPortalDialog* self,
                                         const gchar* value);
static GObject * ag_portal_dialog_constructor (GType type,
                                        guint n_construct_properties,
                                        GObjectConstructParam * construct_properties);
static Block5Data* block5_data_ref (Block5Data* _data5_);
static void block5_data_unref (void * _userdata_);
static void _ag_portal_dialog___lambda8_ (Block5Data* _data5_);
static void __ag_portal_dialog___lambda8__g_object_notify (GObject* _sender,
                                                    GParamSpec* pspec,
                                                    gpointer self);
static void _ag_portal_dialog_on_realize_gtk_widget_realize (GtkWidget* _sender,
                                                      gpointer self);
static void _ag_portal_dialog___lambda9_ (AgPortalDialog* self);
static void __ag_portal_dialog___lambda9__gtk_button_clicked (GtkButton* _sender,
                                                       gpointer self);
static void _ag_portal_dialog___lambda10_ (AgPortalDialog* self);
static void __ag_portal_dialog___lambda10__gtk_button_clicked (GtkButton* _sender,
                                                        gpointer self);
static gboolean _ag_portal_dialog___lambda11_ (AgPortalDialog* self);
static gboolean __ag_portal_dialog___lambda11__gtk_window_close_request (GtkWindow* _sender,
                                                                  gpointer self);
static void ag_portal_dialog_finalize (GObject * obj);
static GType ag_portal_dialog_get_type_once (void);
static void _vala_ag_portal_dialog_get_property (GObject * object,
                                          guint property_id,
                                          GValue * value,
                                          GParamSpec * pspec);
static void _vala_ag_portal_dialog_set_property (GObject * object,
                                          guint property_id,
                                          const GValue * value,
                                          GParamSpec * pspec);

static inline gpointer
ag_portal_dialog_get_instance_private (AgPortalDialog* self)
{
	return G_STRUCT_MEMBER_P (self, AgPortalDialog_private_offset);
}

static GType
ag_portal_dialog_action_type_get_type_once (void)
{
	static const GEnumValue values[] = {{AG_PORTAL_DIALOG_ACTION_TYPE_SUGGESTED, "AG_PORTAL_DIALOG_ACTION_TYPE_SUGGESTED", "suggested"}, {AG_PORTAL_DIALOG_ACTION_TYPE_DESTRUCTIVE, "AG_PORTAL_DIALOG_ACTION_TYPE_DESTRUCTIVE", "destructive"}, {0, NULL, NULL}};
	GType ag_portal_dialog_action_type_type_id;
	ag_portal_dialog_action_type_type_id = g_enum_register_static ("AgPortalDialogActionType", values);
	return ag_portal_dialog_action_type_type_id;
}

GType
ag_portal_dialog_action_type_get_type (void)
{
	static volatile gsize ag_portal_dialog_action_type_type_id__once = 0;
	if (g_once_init_enter (&ag_portal_dialog_action_type_type_id__once)) {
		GType ag_portal_dialog_action_type_type_id;
		ag_portal_dialog_action_type_type_id = ag_portal_dialog_action_type_get_type_once ();
		g_once_init_leave (&ag_portal_dialog_action_type_type_id__once, ag_portal_dialog_action_type_type_id);
	}
	return ag_portal_dialog_action_type_type_id__once;
}

guint32
ag_portal_dialog_response_type_to_id (AgPortalDialogResponseType self)
{
	guint32 result;
	switch (self) {
		case AG_PORTAL_DIALOG_RESPONSE_TYPE_ALLOW:
		{
			result = (guint32) 0;
			return result;
		}
		case AG_PORTAL_DIALOG_RESPONSE_TYPE_CANCEL:
		{
			result = (guint32) 1;
			return result;
		}
		default:
		case AG_PORTAL_DIALOG_RESPONSE_TYPE_DELETE_EVENT:
		{
			result = (guint32) 2;
			return result;
		}
	}
}

static GType
ag_portal_dialog_response_type_get_type_once (void)
{
	static const GEnumValue values[] = {{AG_PORTAL_DIALOG_RESPONSE_TYPE_ALLOW, "AG_PORTAL_DIALOG_RESPONSE_TYPE_ALLOW", "allow"}, {AG_PORTAL_DIALOG_RESPONSE_TYPE_CANCEL, "AG_PORTAL_DIALOG_RESPONSE_TYPE_CANCEL", "cancel"}, {AG_PORTAL_DIALOG_RESPONSE_TYPE_DELETE_EVENT, "AG_PORTAL_DIALOG_RESPONSE_TYPE_DELETE_EVENT", "delete-event"}, {0, NULL, NULL}};
	GType ag_portal_dialog_response_type_type_id;
	ag_portal_dialog_response_type_type_id = g_enum_register_static ("AgPortalDialogResponseType", values);
	return ag_portal_dialog_response_type_type_id;
}

GType
ag_portal_dialog_response_type_get_type (void)
{
	static volatile gsize ag_portal_dialog_response_type_type_id__once = 0;
	if (g_once_init_enter (&ag_portal_dialog_response_type_type_id__once)) {
		GType ag_portal_dialog_response_type_type_id;
		ag_portal_dialog_response_type_type_id = ag_portal_dialog_response_type_get_type_once ();
		g_once_init_leave (&ag_portal_dialog_response_type_type_id__once, ag_portal_dialog_response_type_type_id);
	}
	return ag_portal_dialog_response_type_type_id__once;
}

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

static void
ag_portal_dialog_on_realize (AgPortalDialog* self)
{
	GdkSurface* surface = NULL;
	GdkSurface* _tmp0_;
	GdkSurface* _tmp1_;
	GdkSurface* _tmp2_;
	g_return_if_fail (self != NULL);
	pantheon_wayland_extended_behavior_connect_to_shell ((PantheonWaylandExtendedBehavior*) self);
	pantheon_wayland_extended_behavior_set_keep_above ((PantheonWaylandExtendedBehavior*) self);
	pantheon_wayland_extended_behavior_make_centered ((PantheonWaylandExtendedBehavior*) self);
	pantheon_wayland_extended_behavior_make_modal ((PantheonWaylandExtendedBehavior*) self, TRUE);
	_tmp0_ = gtk_native_get_surface ((GtkNative*) self);
	_tmp1_ = _g_object_ref0 (_tmp0_);
	surface = _tmp1_;
	_tmp2_ = surface;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, gdk_toplevel_get_type ())) {
		GdkSurface* _tmp3_;
		_tmp3_ = surface;
		gdk_toplevel_inhibit_system_shortcuts (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gdk_toplevel_get_type (), GdkToplevel), NULL);
	}
	_g_object_unref0 (surface);
}

AgPortalDialog*
ag_portal_dialog_construct (GType object_type)
{
	AgPortalDialog * self = NULL;
	self = (AgPortalDialog*) g_object_new (object_type, NULL);
	return self;
}

AgPortalDialog*
ag_portal_dialog_new (void)
{
	return ag_portal_dialog_construct (AG_TYPE_PORTAL_DIALOG);
}

GIcon*
ag_portal_dialog_get_primary_icon (AgPortalDialog* self)
{
	GIcon* result;
	GIcon* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_primary_icon;
	result = _tmp0_;
	return result;
}

void
ag_portal_dialog_set_primary_icon (AgPortalDialog* self,
                                   GIcon* value)
{
	GIcon* old_value;
	g_return_if_fail (self != NULL);
	old_value = ag_portal_dialog_get_primary_icon (self);
	if (old_value != value) {
		GIcon* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_primary_icon);
		self->priv->_primary_icon = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, ag_portal_dialog_properties[AG_PORTAL_DIALOG_PRIMARY_ICON_PROPERTY]);
	}
}

GIcon*
ag_portal_dialog_get_secondary_icon (AgPortalDialog* self)
{
	GIcon* result;
	GIcon* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_secondary_icon;
	result = _tmp0_;
	return result;
}

void
ag_portal_dialog_set_secondary_icon (AgPortalDialog* self,
                                     GIcon* value)
{
	GIcon* old_value;
	g_return_if_fail (self != NULL);
	old_value = ag_portal_dialog_get_secondary_icon (self);
	if (old_value != value) {
		GIcon* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_secondary_icon);
		self->priv->_secondary_icon = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, ag_portal_dialog_properties[AG_PORTAL_DIALOG_SECONDARY_ICON_PROPERTY]);
	}
}

const gchar*
ag_portal_dialog_get_secondary_text (AgPortalDialog* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_secondary_text;
	result = _tmp0_;
	return result;
}

void
ag_portal_dialog_set_secondary_text (AgPortalDialog* self,
                                     const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = ag_portal_dialog_get_secondary_text (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_secondary_text);
		self->priv->_secondary_text = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, ag_portal_dialog_properties[AG_PORTAL_DIALOG_SECONDARY_TEXT_PROPERTY]);
	}
}

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

void
ag_portal_dialog_set_content (AgPortalDialog* self,
                              GtkWidget* value)
{
	GtkWidget* old_value;
	g_return_if_fail (self != NULL);
	old_value = ag_portal_dialog_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, ag_portal_dialog_properties[AG_PORTAL_DIALOG_CONTENT_PROPERTY]);
	}
}

const gchar*
ag_portal_dialog_get_cancel_label (AgPortalDialog* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_cancel_label;
	result = _tmp0_;
	return result;
}

void
ag_portal_dialog_set_cancel_label (AgPortalDialog* self,
                                   const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = ag_portal_dialog_get_cancel_label (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_cancel_label);
		self->priv->_cancel_label = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, ag_portal_dialog_properties[AG_PORTAL_DIALOG_CANCEL_LABEL_PROPERTY]);
	}
}

const gchar*
ag_portal_dialog_get_allow_label (AgPortalDialog* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_allow_label;
	result = _tmp0_;
	return result;
}

void
ag_portal_dialog_set_allow_label (AgPortalDialog* self,
                                  const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = ag_portal_dialog_get_allow_label (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_allow_label);
		self->priv->_allow_label = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, ag_portal_dialog_properties[AG_PORTAL_DIALOG_ALLOW_LABEL_PROPERTY]);
	}
}

gboolean
ag_portal_dialog_get_form_valid (AgPortalDialog* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_form_valid;
	return result;
}

void
ag_portal_dialog_set_form_valid (AgPortalDialog* self,
                                 gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = ag_portal_dialog_get_form_valid (self);
	if (old_value != value) {
		self->priv->_form_valid = value;
		g_object_notify_by_pspec ((GObject *) self, ag_portal_dialog_properties[AG_PORTAL_DIALOG_FORM_VALID_PROPERTY]);
	}
}

AgPortalDialogActionType
ag_portal_dialog_get_action_type (AgPortalDialog* self)
{
	AgPortalDialogActionType result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_action_type;
	return result;
}

void
ag_portal_dialog_set_action_type (AgPortalDialog* self,
                                  AgPortalDialogActionType value)
{
	AgPortalDialogActionType old_value;
	g_return_if_fail (self != NULL);
	old_value = ag_portal_dialog_get_action_type (self);
	if (old_value != value) {
		self->priv->_action_type = value;
		g_object_notify_by_pspec ((GObject *) self, ag_portal_dialog_properties[AG_PORTAL_DIALOG_ACTION_TYPE_PROPERTY]);
	}
}

const gchar*
ag_portal_dialog_get_parent_handle (AgPortalDialog* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_parent_handle;
	result = _tmp0_;
	return result;
}

void
ag_portal_dialog_set_parent_handle (AgPortalDialog* self,
                                    const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = ag_portal_dialog_get_parent_handle (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_parent_handle);
		self->priv->_parent_handle = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, ag_portal_dialog_properties[AG_PORTAL_DIALOG_PARENT_HANDLE_PROPERTY]);
	}
}

static Block5Data*
block5_data_ref (Block5Data* _data5_)
{
	g_atomic_int_inc (&_data5_->_ref_count_);
	return _data5_;
}

static void
block5_data_unref (void * _userdata_)
{
	Block5Data* _data5_;
	_data5_ = (Block5Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data5_->_ref_count_)) {
		AgPortalDialog* self;
		self = _data5_->self;
		_g_object_unref0 (_data5_->allow_button);
		_g_object_unref0 (_data5_->cancel_button);
		_g_object_unref0 (self);
		g_slice_free (Block5Data, _data5_);
	}
}

static void
_ag_portal_dialog___lambda8_ (Block5Data* _data5_)
{
	AgPortalDialog* self;
	AgPortalDialogActionType _tmp0_;
	self = _data5_->self;
	_tmp0_ = self->priv->_action_type;
	if (_tmp0_ == AG_PORTAL_DIALOG_ACTION_TYPE_SUGGESTED) {
		GtkButton* _tmp1_;
		GtkButton* _tmp2_;
		GtkButton* _tmp3_;
		GtkButton* _tmp4_;
		_tmp1_ = _data5_->allow_button;
		gtk_widget_add_css_class ((GtkWidget*) _tmp1_, GRANITE_CSS_CLASS_SUGGESTED);
		_tmp2_ = _data5_->cancel_button;
		gtk_widget_set_receives_default ((GtkWidget*) _tmp2_, FALSE);
		_tmp3_ = _data5_->allow_button;
		gtk_widget_set_receives_default ((GtkWidget*) _tmp3_, TRUE);
		_tmp4_ = _data5_->allow_button;
		gtk_window_set_default_widget ((GtkWindow*) self, (GtkWidget*) _tmp4_);
	} else {
		GtkButton* _tmp5_;
		GtkButton* _tmp6_;
		GtkButton* _tmp7_;
		GtkButton* _tmp8_;
		_tmp5_ = _data5_->allow_button;
		gtk_widget_add_css_class ((GtkWidget*) _tmp5_, GRANITE_CSS_CLASS_DESTRUCTIVE);
		_tmp6_ = _data5_->allow_button;
		gtk_widget_set_receives_default ((GtkWidget*) _tmp6_, FALSE);
		_tmp7_ = _data5_->cancel_button;
		gtk_widget_set_receives_default ((GtkWidget*) _tmp7_, TRUE);
		_tmp8_ = _data5_->cancel_button;
		gtk_window_set_default_widget ((GtkWindow*) self, (GtkWidget*) _tmp8_);
	}
}

static void
__ag_portal_dialog___lambda8__g_object_notify (GObject* _sender,
                                               GParamSpec* pspec,
                                               gpointer self)
{
	_ag_portal_dialog___lambda8_ (self);
}

static void
_ag_portal_dialog_on_realize_gtk_widget_realize (GtkWidget* _sender,
                                                 gpointer self)
{
	ag_portal_dialog_on_realize ((AgPortalDialog*) self);
}

static void
_ag_portal_dialog___lambda9_ (AgPortalDialog* self)
{
	g_signal_emit (self, ag_portal_dialog_signals[AG_PORTAL_DIALOG_RESPONSE_SIGNAL], 0, AG_PORTAL_DIALOG_RESPONSE_TYPE_ALLOW);
}

static void
__ag_portal_dialog___lambda9__gtk_button_clicked (GtkButton* _sender,
                                                  gpointer self)
{
	_ag_portal_dialog___lambda9_ ((AgPortalDialog*) self);
}

static void
_ag_portal_dialog___lambda10_ (AgPortalDialog* self)
{
	g_signal_emit (self, ag_portal_dialog_signals[AG_PORTAL_DIALOG_RESPONSE_SIGNAL], 0, AG_PORTAL_DIALOG_RESPONSE_TYPE_CANCEL);
}

static void
__ag_portal_dialog___lambda10__gtk_button_clicked (GtkButton* _sender,
                                                   gpointer self)
{
	_ag_portal_dialog___lambda10_ ((AgPortalDialog*) self);
}

static gboolean
_ag_portal_dialog___lambda11_ (AgPortalDialog* self)
{
	g_signal_emit (self, ag_portal_dialog_signals[AG_PORTAL_DIALOG_RESPONSE_SIGNAL], 0, AG_PORTAL_DIALOG_RESPONSE_TYPE_DELETE_EVENT);
}

static gboolean
__ag_portal_dialog___lambda11__gtk_window_close_request (GtkWindow* _sender,
                                                         gpointer self)
{
	gboolean result;
	result = _ag_portal_dialog___lambda11_ ((AgPortalDialog*) self);
	return result;
}

static GObject *
ag_portal_dialog_constructor (GType type,
                              guint n_construct_properties,
                              GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	AgPortalDialog * self;
	Block5Data* _data5_;
	GtkImage* primary_icon = NULL;
	GtkImage* _tmp0_ = NULL;
	GtkImage* secondary_icon = NULL;
	GtkImage* _tmp1_ = NULL;
	GtkOverlay* overlay = NULL;
	GtkImage* _tmp2_;
	GtkWidget* _tmp3_;
	GtkOverlay* _tmp4_ = NULL;
	GtkOverlay* _tmp5_;
	GtkImage* _tmp6_;
	GraniteHeaderLabel* header_label = NULL;
	GraniteHeaderLabel* _tmp7_ = NULL;
	GraniteBox* header = NULL;
	GraniteBox* _tmp8_;
	GraniteBox* _tmp9_;
	GtkOverlay* _tmp10_;
	GraniteBox* _tmp11_;
	GraniteHeaderLabel* _tmp12_;
	GtkButton* _tmp13_;
	GtkButton* _tmp14_ = NULL;
	GtkButton* _tmp15_;
	GraniteBox* _tmp16_ = NULL;
	GraniteBox* _tmp17_;
	GtkButton* _tmp18_;
	GraniteBox* _tmp19_;
	GtkButton* _tmp20_;
	GraniteToolBox* toolbarview = NULL;
	GraniteToolBox* _tmp21_;
	GraniteToolBox* _tmp22_;
	GraniteBox* _tmp23_;
	GraniteToolBox* _tmp24_;
	GraniteBox* _tmp25_;
	GraniteToolBox* _tmp26_;
	GtkButton* _tmp27_;
	GtkGrid* _tmp28_ = NULL;
	GtkGrid* _tmp29_;
	GtkImage* _tmp30_;
	GtkImage* _tmp31_;
	GraniteToolBox* _tmp32_;
	GraniteHeaderLabel* _tmp33_;
	GraniteHeaderLabel* _tmp34_;
	GtkButton* _tmp35_;
	GtkButton* _tmp36_;
	GtkButton* _tmp37_;
	GtkWidget* _tmp38_;
	GtkWidget* _tmp39_;
	GtkButton* _tmp40_;
	GtkButton* _tmp41_;
	parent_class = G_OBJECT_CLASS (ag_portal_dialog_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, AG_TYPE_PORTAL_DIALOG, AgPortalDialog);
	_data5_ = g_slice_new0 (Block5Data);
	_data5_->_ref_count_ = 1;
	_data5_->self = g_object_ref (self);
	_tmp0_ = (GtkImage*) gtk_image_new_from_icon_name ("application-default-icon");
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_image_set_icon_size (_tmp0_, GTK_ICON_SIZE_LARGE);
	g_object_ref_sink (_tmp0_);
	primary_icon = _tmp0_;
	_tmp1_ = (GtkImage*) gtk_image_new_from_icon_name ("preferences-system-privacy");
	gtk_widget_set_halign ((GtkWidget*) _tmp1_, GTK_ALIGN_END);
	gtk_image_set_icon_size (_tmp1_, GTK_ICON_SIZE_LARGE);
	g_object_ref_sink (_tmp1_);
	secondary_icon = _tmp1_;
	_tmp2_ = secondary_icon;
	_tmp3_ = _g_object_ref0 ((GtkWidget*) _tmp2_);
	_tmp4_ = (GtkOverlay*) gtk_overlay_new ();
	gtk_overlay_set_child (_tmp4_, _tmp3_);
	_g_object_unref0 (_tmp3_);
	gtk_widget_set_halign ((GtkWidget*) _tmp4_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp4_);
	overlay = _tmp4_;
	_tmp5_ = overlay;
	_tmp6_ = primary_icon;
	gtk_overlay_add_overlay (_tmp5_, (GtkWidget*) _tmp6_);
	_tmp7_ = granite_header_label_new ("");
	granite_header_label_set_size (_tmp7_, GRANITE_HEADER_LABEL_SIZE_H3);
	g_object_ref_sink (_tmp7_);
	header_label = _tmp7_;
	_tmp8_ = granite_box_new (GTK_ORIENTATION_VERTICAL, GRANITE_BOX_SPACING_SINGLE);
	g_object_ref_sink (_tmp8_);
	header = _tmp8_;
	_tmp9_ = header;
	_tmp10_ = overlay;
	gtk_box_append ((GtkBox*) _tmp9_, (GtkWidget*) _tmp10_);
	_tmp11_ = header;
	_tmp12_ = header_label;
	gtk_box_append ((GtkBox*) _tmp11_, (GtkWidget*) _tmp12_);
	_tmp13_ = (GtkButton*) gtk_button_new_with_label (_ ("Don't Allow"));
	g_object_ref_sink (_tmp13_);
	_data5_->cancel_button = _tmp13_;
	_tmp14_ = (GtkButton*) gtk_button_new_with_label (_ ("Allow"));
	gtk_widget_set_receives_default ((GtkWidget*) _tmp14_, TRUE);
	g_object_ref_sink (_tmp14_);
	_data5_->allow_button = _tmp14_;
	_tmp15_ = _data5_->allow_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp15_, GRANITE_CSS_CLASS_SUGGESTED);
	_tmp16_ = granite_box_new (GTK_ORIENTATION_HORIZONTAL, GRANITE_BOX_SPACING_HALF);
	gtk_box_set_homogeneous ((GtkBox*) _tmp16_, TRUE);
	gtk_widget_set_valign ((GtkWidget*) _tmp16_, GTK_ALIGN_END);
	g_object_ref_sink (_tmp16_);
	_g_object_unref0 (self->priv->button_box);
	self->priv->button_box = _tmp16_;
	_tmp17_ = self->priv->button_box;
	_tmp18_ = _data5_->cancel_button;
	gtk_box_append ((GtkBox*) _tmp17_, (GtkWidget*) _tmp18_);
	_tmp19_ = self->priv->button_box;
	_tmp20_ = _data5_->allow_button;
	gtk_box_append ((GtkBox*) _tmp19_, (GtkWidget*) _tmp20_);
	_tmp21_ = granite_tool_box_new ();
	g_object_ref_sink (_tmp21_);
	toolbarview = _tmp21_;
	_tmp22_ = toolbarview;
	_tmp23_ = self->priv->button_box;
	granite_tool_box_add_bottom_bar (_tmp22_, (GtkWidget*) _tmp23_);
	_tmp24_ = toolbarview;
	_tmp25_ = header;
	granite_tool_box_add_top_bar (_tmp24_, (GtkWidget*) _tmp25_);
	_tmp26_ = toolbarview;
	gtk_window_set_child ((GtkWindow*) self, (GtkWidget*) _tmp26_);
	g_object_set ((GtkWindow*) self, "default-width", 325, NULL);
	_tmp27_ = _data5_->allow_button;
	gtk_window_set_default_widget ((GtkWindow*) self, (GtkWidget*) _tmp27_);
	gtk_window_set_modal ((GtkWindow*) self, TRUE);
	_tmp28_ = (GtkGrid*) gtk_grid_new ();
	gtk_widget_set_visible ((GtkWidget*) _tmp28_, FALSE);
	g_object_ref_sink (_tmp28_);
	_tmp29_ = _tmp28_;
	gtk_window_set_titlebar ((GtkWindow*) self, (GtkWidget*) _tmp29_);
	_g_object_unref0 (_tmp29_);
	gtk_widget_add_css_class ((GtkWidget*) self, "dialog");
	_tmp30_ = primary_icon;
	g_object_bind_property_with_closures ((GObject*) self, "primary-icon", (GObject*) _tmp30_, "gicon", G_BINDING_DEFAULT, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp31_ = secondary_icon;
	g_object_bind_property_with_closures ((GObject*) self, "secondary-icon", (GObject*) _tmp31_, "gicon", G_BINDING_DEFAULT, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp32_ = toolbarview;
	g_object_bind_property_with_closures ((GObject*) self, "content", (GObject*) _tmp32_, "content", G_BINDING_DEFAULT, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp33_ = header_label;
	g_object_bind_property_with_closures ((GObject*) self, "title", (GObject*) _tmp33_, "label", G_BINDING_DEFAULT, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp34_ = header_label;
	g_object_bind_property_with_closures ((GObject*) self, "secondary-text", (GObject*) _tmp34_, "secondary-text", G_BINDING_DEFAULT, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp35_ = _data5_->allow_button;
	g_object_bind_property_with_closures ((GObject*) self, "form-valid", (GObject*) _tmp35_, "sensitive", G_BINDING_DEFAULT, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp36_ = _data5_->allow_button;
	g_object_bind_property_with_closures ((GObject*) self, "allow-label", (GObject*) _tmp36_, "label", G_BINDING_DEFAULT, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp37_ = _data5_->cancel_button;
	g_object_bind_property_with_closures ((GObject*) self, "cancel-label", (GObject*) _tmp37_, "label", G_BINDING_DEFAULT, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	g_signal_connect_data ((GObject*) self, "notify::action-type", (GCallback) __ag_portal_dialog___lambda8__g_object_notify, block5_data_ref (_data5_), (GClosureNotify) block5_data_unref, 0);
	_tmp38_ = gtk_window_get_child ((GtkWindow*) self);
	_tmp39_ = _tmp38_;
	g_signal_connect_object (_tmp39_, "realize", (GCallback) _ag_portal_dialog_on_realize_gtk_widget_realize, self, 0);
	_tmp40_ = _data5_->allow_button;
	g_signal_connect_object (_tmp40_, "clicked", (GCallback) __ag_portal_dialog___lambda9__gtk_button_clicked, self, 0);
	_tmp41_ = _data5_->cancel_button;
	g_signal_connect_object (_tmp41_, "clicked", (GCallback) __ag_portal_dialog___lambda10__gtk_button_clicked, self, 0);
	g_signal_connect_object ((GtkWindow*) self, "close-request", (GCallback) __ag_portal_dialog___lambda11__gtk_window_close_request, self, 0);
	_g_object_unref0 (toolbarview);
	_g_object_unref0 (header);
	_g_object_unref0 (header_label);
	_g_object_unref0 (overlay);
	_g_object_unref0 (secondary_icon);
	_g_object_unref0 (primary_icon);
	block5_data_unref (_data5_);
	_data5_ = NULL;
	return obj;
}

static void
ag_portal_dialog_class_init (AgPortalDialogClass * klass,
                             gpointer klass_data)
{
	ag_portal_dialog_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &AgPortalDialog_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_ag_portal_dialog_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_ag_portal_dialog_set_property;
	G_OBJECT_CLASS (klass)->constructor = ag_portal_dialog_constructor;
	G_OBJECT_CLASS (klass)->finalize = ag_portal_dialog_finalize;
	/**
	     * The {@link GLib.Icon} that is used to display the primary_icon representing the app making the request
	     */
	g_object_class_install_property (G_OBJECT_CLASS (klass), AG_PORTAL_DIALOG_PRIMARY_ICON_PROPERTY, ag_portal_dialog_properties[AG_PORTAL_DIALOG_PRIMARY_ICON_PROPERTY] = g_param_spec_object ("primary-icon", "primary-icon", "primary-icon", g_icon_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	     * The {@link GLib.Icon} that is used to display a secondary_icon representing the action to be performed
	     */
	g_object_class_install_property (G_OBJECT_CLASS (klass), AG_PORTAL_DIALOG_SECONDARY_ICON_PROPERTY, ag_portal_dialog_properties[AG_PORTAL_DIALOG_SECONDARY_ICON_PROPERTY] = g_param_spec_object ("secondary-icon", "secondary-icon", "secondary-icon", g_icon_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	     * The secondary text, body of the dialog.
	     */
	g_object_class_install_property (G_OBJECT_CLASS (klass), AG_PORTAL_DIALOG_SECONDARY_TEXT_PROPERTY, ag_portal_dialog_properties[AG_PORTAL_DIALOG_SECONDARY_TEXT_PROPERTY] = g_param_spec_string ("secondary-text", "secondary-text", "secondary-text", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	     * The child widget for the content area
	     */
	g_object_class_install_property (G_OBJECT_CLASS (klass), AG_PORTAL_DIALOG_CONTENT_PROPERTY, ag_portal_dialog_properties[AG_PORTAL_DIALOG_CONTENT_PROPERTY] = g_param_spec_object ("content", "content", "content", gtk_widget_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	     * The label of the button which denies access
	     */
	g_object_class_install_property (G_OBJECT_CLASS (klass), AG_PORTAL_DIALOG_CANCEL_LABEL_PROPERTY, ag_portal_dialog_properties[AG_PORTAL_DIALOG_CANCEL_LABEL_PROPERTY] = g_param_spec_string ("cancel-label", "cancel-label", "cancel-label", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	     * The label of the button which allows access
	     */
	g_object_class_install_property (G_OBJECT_CLASS (klass), AG_PORTAL_DIALOG_ALLOW_LABEL_PROPERTY, ag_portal_dialog_properties[AG_PORTAL_DIALOG_ALLOW_LABEL_PROPERTY] = g_param_spec_string ("allow-label", "allow-label", "allow-label", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	     * Whether the allow button should be disabled
	     */
	g_object_class_install_property (G_OBJECT_CLASS (klass), AG_PORTAL_DIALOG_FORM_VALID_PROPERTY, ag_portal_dialog_properties[AG_PORTAL_DIALOG_FORM_VALID_PROPERTY] = g_param_spec_boolean ("form-valid", "form-valid", "form-valid", TRUE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), AG_PORTAL_DIALOG_ACTION_TYPE_PROPERTY, ag_portal_dialog_properties[AG_PORTAL_DIALOG_ACTION_TYPE_PROPERTY] = g_param_spec_enum ("action-type", "action-type", "action-type", AG_PORTAL_DIALOG_TYPE_ACTION_TYPE, AG_PORTAL_DIALOG_ACTION_TYPE_SUGGESTED, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	     * The parent window identifier as described by https://flatpak.github.io/xdg-desktop-portal/docs/window-identifiers.html
	     */
	g_object_class_install_property (G_OBJECT_CLASS (klass), AG_PORTAL_DIALOG_PARENT_HANDLE_PROPERTY, ag_portal_dialog_properties[AG_PORTAL_DIALOG_PARENT_HANDLE_PROPERTY] = g_param_spec_string ("parent-handle", "parent-handle", "parent-handle", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	     * The {@link PortalDialog.ResponseType} that has been selected by the user
	     */
	ag_portal_dialog_signals[AG_PORTAL_DIALOG_RESPONSE_SIGNAL] = g_signal_new ("response", AG_TYPE_PORTAL_DIALOG, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__ENUM, G_TYPE_NONE, 1, AG_PORTAL_DIALOG_TYPE_RESPONSE_TYPE);
}

static void
ag_portal_dialog_pantheon_wayland_extended_behavior_interface_init (PantheonWaylandExtendedBehaviorIface * iface,
                                                                    gpointer iface_data)
{
	ag_portal_dialog_pantheon_wayland_extended_behavior_parent_iface = g_type_interface_peek_parent (iface);
}

static void
ag_portal_dialog_instance_init (AgPortalDialog * self,
                                gpointer klass)
{
	self->priv = ag_portal_dialog_get_instance_private (self);
	self->priv->_form_valid = TRUE;
	self->priv->_action_type = AG_PORTAL_DIALOG_ACTION_TYPE_SUGGESTED;
}

static void
ag_portal_dialog_finalize (GObject * obj)
{
	AgPortalDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, AG_TYPE_PORTAL_DIALOG, AgPortalDialog);
	_g_object_unref0 (self->priv->_primary_icon);
	_g_object_unref0 (self->priv->_secondary_icon);
	_g_free0 (self->priv->_secondary_text);
	_g_object_unref0 (self->priv->_content);
	_g_free0 (self->priv->_cancel_label);
	_g_free0 (self->priv->_allow_label);
	_g_free0 (self->priv->_parent_handle);
	_g_object_unref0 (self->priv->button_box);
	G_OBJECT_CLASS (ag_portal_dialog_parent_class)->finalize (obj);
}

static GType
ag_portal_dialog_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AgPortalDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ag_portal_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AgPortalDialog), 0, (GInstanceInitFunc) ag_portal_dialog_instance_init, NULL };
	static const GInterfaceInfo pantheon_wayland_extended_behavior_info = { (GInterfaceInitFunc) ag_portal_dialog_pantheon_wayland_extended_behavior_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType ag_portal_dialog_type_id;
	ag_portal_dialog_type_id = g_type_register_static (gtk_window_get_type (), "AgPortalDialog", &g_define_type_info, 0);
	g_type_add_interface_static (ag_portal_dialog_type_id, PANTHEON_WAYLAND_TYPE_EXTENDED_BEHAVIOR, &pantheon_wayland_extended_behavior_info);
	AgPortalDialog_private_offset = g_type_add_instance_private (ag_portal_dialog_type_id, sizeof (AgPortalDialogPrivate));
	return ag_portal_dialog_type_id;
}

GType
ag_portal_dialog_get_type (void)
{
	static volatile gsize ag_portal_dialog_type_id__once = 0;
	if (g_once_init_enter (&ag_portal_dialog_type_id__once)) {
		GType ag_portal_dialog_type_id;
		ag_portal_dialog_type_id = ag_portal_dialog_get_type_once ();
		g_once_init_leave (&ag_portal_dialog_type_id__once, ag_portal_dialog_type_id);
	}
	return ag_portal_dialog_type_id__once;
}

static void
_vala_ag_portal_dialog_get_property (GObject * object,
                                     guint property_id,
                                     GValue * value,
                                     GParamSpec * pspec)
{
	AgPortalDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, AG_TYPE_PORTAL_DIALOG, AgPortalDialog);
	switch (property_id) {
		case AG_PORTAL_DIALOG_PRIMARY_ICON_PROPERTY:
		g_value_set_object (value, ag_portal_dialog_get_primary_icon (self));
		break;
		case AG_PORTAL_DIALOG_SECONDARY_ICON_PROPERTY:
		g_value_set_object (value, ag_portal_dialog_get_secondary_icon (self));
		break;
		case AG_PORTAL_DIALOG_SECONDARY_TEXT_PROPERTY:
		g_value_set_string (value, ag_portal_dialog_get_secondary_text (self));
		break;
		case AG_PORTAL_DIALOG_CONTENT_PROPERTY:
		g_value_set_object (value, ag_portal_dialog_get_content (self));
		break;
		case AG_PORTAL_DIALOG_CANCEL_LABEL_PROPERTY:
		g_value_set_string (value, ag_portal_dialog_get_cancel_label (self));
		break;
		case AG_PORTAL_DIALOG_ALLOW_LABEL_PROPERTY:
		g_value_set_string (value, ag_portal_dialog_get_allow_label (self));
		break;
		case AG_PORTAL_DIALOG_FORM_VALID_PROPERTY:
		g_value_set_boolean (value, ag_portal_dialog_get_form_valid (self));
		break;
		case AG_PORTAL_DIALOG_ACTION_TYPE_PROPERTY:
		g_value_set_enum (value, ag_portal_dialog_get_action_type (self));
		break;
		case AG_PORTAL_DIALOG_PARENT_HANDLE_PROPERTY:
		g_value_set_string (value, ag_portal_dialog_get_parent_handle (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_ag_portal_dialog_set_property (GObject * object,
                                     guint property_id,
                                     const GValue * value,
                                     GParamSpec * pspec)
{
	AgPortalDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, AG_TYPE_PORTAL_DIALOG, AgPortalDialog);
	switch (property_id) {
		case AG_PORTAL_DIALOG_PRIMARY_ICON_PROPERTY:
		ag_portal_dialog_set_primary_icon (self, g_value_get_object (value));
		break;
		case AG_PORTAL_DIALOG_SECONDARY_ICON_PROPERTY:
		ag_portal_dialog_set_secondary_icon (self, g_value_get_object (value));
		break;
		case AG_PORTAL_DIALOG_SECONDARY_TEXT_PROPERTY:
		ag_portal_dialog_set_secondary_text (self, g_value_get_string (value));
		break;
		case AG_PORTAL_DIALOG_CONTENT_PROPERTY:
		ag_portal_dialog_set_content (self, g_value_get_object (value));
		break;
		case AG_PORTAL_DIALOG_CANCEL_LABEL_PROPERTY:
		ag_portal_dialog_set_cancel_label (self, g_value_get_string (value));
		break;
		case AG_PORTAL_DIALOG_ALLOW_LABEL_PROPERTY:
		ag_portal_dialog_set_allow_label (self, g_value_get_string (value));
		break;
		case AG_PORTAL_DIALOG_FORM_VALID_PROPERTY:
		ag_portal_dialog_set_form_valid (self, g_value_get_boolean (value));
		break;
		case AG_PORTAL_DIALOG_ACTION_TYPE_PROPERTY:
		ag_portal_dialog_set_action_type (self, g_value_get_enum (value));
		break;
		case AG_PORTAL_DIALOG_PARENT_HANDLE_PROPERTY:
		ag_portal_dialog_set_parent_handle (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

