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

/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*-
 * -*- coding: utf-8 -*-
 *
 * Copyright (C) 2011 ~ 2018 Deepin, Inc.
 *               2011 ~ 2018 Wang Yong
 *
 * Author:     Wang Yong <wangyong@deepin.com>
 * Maintainer: Wang Yong <wangyong@deepin.com>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

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

#define GETTEXT_PACKAGE "deepin-terminal-gtk"
#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 WIDGETS_TYPE_DIALOG (widgets_dialog_get_type ())
#define WIDGETS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_DIALOG, WidgetsDialog))
#define WIDGETS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_DIALOG, WidgetsDialogClass))
#define WIDGETS_IS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_DIALOG))
#define WIDGETS_IS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_DIALOG))
#define WIDGETS_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_DIALOG, WidgetsDialogClass))

typedef struct _WidgetsDialog WidgetsDialog;
typedef struct _WidgetsDialogClass WidgetsDialogClass;
typedef struct _WidgetsDialogPrivate WidgetsDialogPrivate;

#define WIDGETS_TYPE_CONFIG_WINDOW (widgets_config_window_get_type ())
#define WIDGETS_CONFIG_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_CONFIG_WINDOW, WidgetsConfigWindow))
#define WIDGETS_CONFIG_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_CONFIG_WINDOW, WidgetsConfigWindowClass))
#define WIDGETS_IS_CONFIG_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_CONFIG_WINDOW))
#define WIDGETS_IS_CONFIG_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_CONFIG_WINDOW))
#define WIDGETS_CONFIG_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_CONFIG_WINDOW, WidgetsConfigWindowClass))

typedef struct _WidgetsConfigWindow WidgetsConfigWindow;
typedef struct _WidgetsConfigWindowClass WidgetsConfigWindowClass;

#define WIDGETS_TYPE_CONFIRM_DIALOG (widgets_confirm_dialog_get_type ())
#define WIDGETS_CONFIRM_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_CONFIRM_DIALOG, WidgetsConfirmDialog))
#define WIDGETS_CONFIRM_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_CONFIRM_DIALOG, WidgetsConfirmDialogClass))
#define WIDGETS_IS_CONFIRM_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_CONFIRM_DIALOG))
#define WIDGETS_IS_CONFIRM_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_CONFIRM_DIALOG))
#define WIDGETS_CONFIRM_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_CONFIRM_DIALOG, WidgetsConfirmDialogClass))

typedef struct _WidgetsConfirmDialog WidgetsConfirmDialog;
typedef struct _WidgetsConfirmDialogClass WidgetsConfirmDialogClass;
typedef struct _WidgetsConfirmDialogPrivate WidgetsConfirmDialogPrivate;

#define WIDGETS_TYPE_DIALOG_BUTTON (widgets_dialog_button_get_type ())
#define WIDGETS_DIALOG_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_DIALOG_BUTTON, WidgetsDialogButton))
#define WIDGETS_DIALOG_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_DIALOG_BUTTON, WidgetsDialogButtonClass))
#define WIDGETS_IS_DIALOG_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_DIALOG_BUTTON))
#define WIDGETS_IS_DIALOG_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_DIALOG_BUTTON))
#define WIDGETS_DIALOG_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_DIALOG_BUTTON, WidgetsDialogButtonClass))

typedef struct _WidgetsDialogButton WidgetsDialogButton;
typedef struct _WidgetsDialogButtonClass WidgetsDialogButtonClass;
enum  {
	WIDGETS_CONFIRM_DIALOG_0_PROPERTY,
	WIDGETS_CONFIRM_DIALOG_NUM_PROPERTIES
};
static GParamSpec* widgets_confirm_dialog_properties[WIDGETS_CONFIRM_DIALOG_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define WIDGETS_TYPE_CLICK_EVENT_BOX (widgets_click_event_box_get_type ())
#define WIDGETS_CLICK_EVENT_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_CLICK_EVENT_BOX, WidgetsClickEventBox))
#define WIDGETS_CLICK_EVENT_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_CLICK_EVENT_BOX, WidgetsClickEventBoxClass))
#define WIDGETS_IS_CLICK_EVENT_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_CLICK_EVENT_BOX))
#define WIDGETS_IS_CLICK_EVENT_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_CLICK_EVENT_BOX))
#define WIDGETS_CLICK_EVENT_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_CLICK_EVENT_BOX, WidgetsClickEventBoxClass))

typedef struct _WidgetsClickEventBox WidgetsClickEventBox;
typedef struct _WidgetsClickEventBoxClass WidgetsClickEventBoxClass;

#define WIDGETS_TYPE_WINDOW_BUTTON (widgets_window_button_get_type ())
#define WIDGETS_WINDOW_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_WINDOW_BUTTON, WidgetsWindowButton))
#define WIDGETS_WINDOW_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_WINDOW_BUTTON, WidgetsWindowButtonClass))
#define WIDGETS_IS_WINDOW_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_WINDOW_BUTTON))
#define WIDGETS_IS_WINDOW_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_WINDOW_BUTTON))
#define WIDGETS_WINDOW_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_WINDOW_BUTTON, WidgetsWindowButtonClass))

typedef struct _WidgetsWindowButton WidgetsWindowButton;
typedef struct _WidgetsWindowButtonClass WidgetsWindowButtonClass;
#define _g_free0(var) (var = (g_free (var), NULL))

#define WIDGETS_TYPE_WINDOW_EVENT_AREA (widgets_window_event_area_get_type ())
#define WIDGETS_WINDOW_EVENT_AREA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_WINDOW_EVENT_AREA, WidgetsWindowEventArea))
#define WIDGETS_WINDOW_EVENT_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_WINDOW_EVENT_AREA, WidgetsWindowEventAreaClass))
#define WIDGETS_IS_WINDOW_EVENT_AREA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_WINDOW_EVENT_AREA))
#define WIDGETS_IS_WINDOW_EVENT_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_WINDOW_EVENT_AREA))
#define WIDGETS_WINDOW_EVENT_AREA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_WINDOW_EVENT_AREA, WidgetsWindowEventAreaClass))

typedef struct _WidgetsWindowEventArea WidgetsWindowEventArea;
typedef struct _WidgetsWindowEventAreaClass WidgetsWindowEventAreaClass;
enum  {
	WIDGETS_CONFIRM_DIALOG_CANCEL_SIGNAL,
	WIDGETS_CONFIRM_DIALOG_CONFIRM_SIGNAL,
	WIDGETS_CONFIRM_DIALOG_NUM_SIGNALS
};
static guint widgets_confirm_dialog_signals[WIDGETS_CONFIRM_DIALOG_NUM_SIGNALS] = {0};

struct _WidgetsDialog {
	GtkWindow parent_instance;
	WidgetsDialogPrivate * priv;
	GdkScreen* screen_monitor;
	GtkBox* window_frame_box;
	GtkBox* window_widget_box;
	WidgetsConfigWindow* transient_window;
	gint option_widget_margin_end;
	gint option_widget_margin_top;
	gint window_frame_margin_bottom;
	gint window_frame_margin_end;
	gint window_frame_margin_start;
	gint window_frame_margin_top;
	gint window_frame_radius;
	gint window_init_height;
	gint window_init_width;
};

struct _WidgetsDialogClass {
	GtkWindowClass parent_class;
	void (*draw_window_above) (WidgetsDialog* self, cairo_t* cr);
};

struct _WidgetsConfirmDialog {
	WidgetsDialog parent_instance;
	WidgetsConfirmDialogPrivate * priv;
};

struct _WidgetsConfirmDialogClass {
	WidgetsDialogClass parent_class;
};

struct _WidgetsConfirmDialogPrivate {
	WidgetsDialogButton* cancel_button;
	WidgetsDialogButton* confirm_button;
	gint box_margin_bottom;
	gint box_margin_end;
	gint box_margin_top;
	gint content_margin_top;
	gint logo_margin_end;
	gint logo_margin_start;
	gint title_margin_top;
};

static gint WidgetsConfirmDialog_private_offset;
static gpointer widgets_confirm_dialog_parent_class = NULL;
VALA_EXTERN gint constant_CLOSE_BUTTON_WIDTH;
VALA_EXTERN gint constant_DIALOG_BUTTON_HEIGHT;

VALA_EXTERN GType widgets_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsDialog, g_object_unref)
VALA_EXTERN GType widgets_config_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsConfigWindow, g_object_unref)
VALA_EXTERN GType widgets_confirm_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsConfirmDialog, g_object_unref)
VALA_EXTERN GType widgets_dialog_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsDialogButton, g_object_unref)
VALA_EXTERN WidgetsConfirmDialog* widgets_confirm_dialog_new (const gchar* title,
                                                  const gchar* content,
                                                  const gchar* cancel_text,
                                                  const gchar* confirm_text);
VALA_EXTERN WidgetsConfirmDialog* widgets_confirm_dialog_construct (GType object_type,
                                                        const gchar* title,
                                                        const gchar* content,
                                                        const gchar* cancel_text,
                                                        const gchar* confirm_text);
VALA_EXTERN WidgetsDialog* widgets_dialog_new (void);
VALA_EXTERN WidgetsDialog* widgets_dialog_construct (GType object_type);
VALA_EXTERN void widgets_dialog_set_init_size (WidgetsDialog* self,
                                   gint width,
                                   gint height);
VALA_EXTERN GType widgets_click_event_box_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsClickEventBox, g_object_unref)
VALA_EXTERN GType widgets_window_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsWindowButton, g_object_unref)
VALA_EXTERN WidgetsWindowButton* widgets_create_close_button (void);
static void __lambda81_ (WidgetsConfirmDialog* self,
                  GdkEventButton* b);
static void ___lambda81__widgets_click_event_box_clicked (WidgetsClickEventBox* _sender,
                                                   GdkEventButton* event,
                                                   gpointer self);
VALA_EXTERN gchar* utils_get_image_path (const gchar* image_name);
VALA_EXTERN WidgetsDialogButton* widgets_dialog_button_new (const gchar* text,
                                                const gchar* direction,
                                                const gchar* type,
                                                gboolean has_radius);
VALA_EXTERN WidgetsDialogButton* widgets_dialog_button_construct (GType object_type,
                                                      const gchar* text,
                                                      const gchar* direction,
                                                      const gchar* type,
                                                      gboolean has_radius);
static void ___lambda82_ (WidgetsConfirmDialog* self,
                   GtkButton* b);
static void ____lambda82__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void __lambda83_ (WidgetsConfirmDialog* self,
                  GtkButton* b);
static void ___lambda83__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
VALA_EXTERN GType widgets_window_event_area_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsWindowEventArea, g_object_unref)
VALA_EXTERN WidgetsWindowEventArea* widgets_window_event_area_new (GtkContainer* area);
VALA_EXTERN WidgetsWindowEventArea* widgets_window_event_area_construct (GType object_type,
                                                             GtkContainer* area);
VALA_EXTERN void widgets_dialog_add_widget (WidgetsDialog* self,
                                GtkWidget* widget);
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
static void widgets_confirm_dialog_finalize (GObject * obj);
static GType widgets_confirm_dialog_get_type_once (void);
VALA_EXTERN WidgetsConfirmDialog* widgets_create_running_confirm_dialog (WidgetsConfigWindow* window);
VALA_EXTERN void widgets_dialog_transient_for_window (WidgetsDialog* self,
                                          WidgetsConfigWindow* window);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
widgets_confirm_dialog_get_instance_private (WidgetsConfirmDialog* self)
{
	return G_STRUCT_MEMBER_P (self, WidgetsConfirmDialog_private_offset);
}

static void
__lambda81_ (WidgetsConfirmDialog* self,
             GdkEventButton* b)
{
	g_return_if_fail (b != NULL);
	gtk_widget_destroy ((GtkWidget*) self);
}

static void
___lambda81__widgets_click_event_box_clicked (WidgetsClickEventBox* _sender,
                                              GdkEventButton* event,
                                              gpointer self)
{
	__lambda81_ ((WidgetsConfirmDialog*) self, event);
}

static void
___lambda82_ (WidgetsConfirmDialog* self,
              GtkButton* b)
{
	g_return_if_fail (b != NULL);
	g_signal_emit (self, widgets_confirm_dialog_signals[WIDGETS_CONFIRM_DIALOG_CANCEL_SIGNAL], 0);
	gtk_widget_destroy ((GtkWidget*) self);
}

static void
____lambda82__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	___lambda82_ ((WidgetsConfirmDialog*) self, _sender);
}

static void
__lambda83_ (WidgetsConfirmDialog* self,
             GtkButton* b)
{
	g_return_if_fail (b != NULL);
	g_signal_emit (self, widgets_confirm_dialog_signals[WIDGETS_CONFIRM_DIALOG_CONFIRM_SIGNAL], 0);
	gtk_widget_destroy ((GtkWidget*) self);
}

static void
___lambda83__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda83_ ((WidgetsConfirmDialog*) self, _sender);
}

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

static void
_g_object_unref0_ (gpointer var)
{
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}

static inline void
_g_list_free__g_object_unref0_ (GList* self)
{
	g_list_free_full (self, (GDestroyNotify) _g_object_unref0_);
}

WidgetsConfirmDialog*
widgets_confirm_dialog_construct (GType object_type,
                                  const gchar* title,
                                  const gchar* content,
                                  const gchar* cancel_text,
                                  const gchar* confirm_text)
{
	WidgetsConfirmDialog * self = NULL;
	GtkOverlay* overlay = NULL;
	GtkOverlay* _tmp0_;
	GtkBox* box = NULL;
	GtkBox* _tmp1_;
	WidgetsWindowButton* close_button = NULL;
	WidgetsWindowButton* _tmp2_;
	WidgetsWindowButton* _tmp3_;
	GtkBox* close_button_box = NULL;
	GtkBox* _tmp4_;
	GtkBox* content_button_box = NULL;
	GtkBox* _tmp5_;
	GtkBox* _tmp6_;
	GtkBox* _tmp7_;
	GtkBox* _tmp8_;
	GtkImage* logo_image = NULL;
	gchar* _tmp9_;
	gchar* _tmp10_;
	GtkImage* _tmp11_;
	GtkImage* _tmp12_;
	GtkImage* _tmp13_;
	GtkImage* _tmp14_;
	GtkBox* label_box = NULL;
	GtkBox* _tmp15_;
	GtkLabel* title_label = NULL;
	GtkLabel* _tmp16_;
	GtkLabel* _tmp17_;
	GtkLabel* _tmp18_;
	GtkStyleContext* _tmp19_;
	GtkLabel* _tmp20_;
	GtkLabel* _tmp21_;
	GtkLabel* content_label = NULL;
	GtkLabel* _tmp22_;
	GtkLabel* _tmp23_;
	GtkLabel* _tmp24_;
	GtkStyleContext* _tmp25_;
	GtkLabel* _tmp26_;
	GtkLabel* _tmp27_;
	GtkBox* button_box = NULL;
	GtkBox* _tmp28_;
	WidgetsDialogButton* _tmp36_;
	GList* tab_order_list = NULL;
	WidgetsDialogButton* _tmp39_;
	GtkWidget* _tmp40_;
	GtkBox* _tmp41_;
	GList* _tmp42_;
	GtkBox* _tmp43_;
	WidgetsDialogButton* _tmp44_;
	GtkBox* _tmp45_;
	WidgetsWindowButton* _tmp46_;
	GtkBox* _tmp47_;
	GtkLabel* _tmp48_;
	GtkBox* _tmp49_;
	GtkLabel* _tmp50_;
	GtkBox* _tmp51_;
	GtkImage* _tmp52_;
	GtkBox* _tmp53_;
	GtkBox* _tmp54_;
	GtkBox* _tmp57_;
	WidgetsDialogButton* _tmp58_;
	GtkBox* _tmp59_;
	GtkBox* _tmp60_;
	GtkBox* _tmp61_;
	GtkBox* _tmp62_;
	GtkBox* _tmp63_;
	GtkBox* _tmp64_;
	WidgetsWindowEventArea* event_area = NULL;
	WidgetsWindowEventArea* _tmp65_;
	GtkOverlay* _tmp66_;
	GtkBox* _tmp67_;
	GtkOverlay* _tmp68_;
	GtkOverlay* _tmp69_;
	g_return_val_if_fail (title != NULL, NULL);
	g_return_val_if_fail (content != NULL, NULL);
	g_return_val_if_fail (cancel_text != NULL, NULL);
	g_return_val_if_fail (confirm_text != NULL, NULL);
	self = (WidgetsConfirmDialog*) widgets_dialog_construct (object_type);
	bindtextdomain (GETTEXT_PACKAGE, "/usr/share/locale");
	widgets_dialog_set_init_size ((WidgetsDialog*) self, 480, 230);
	_tmp0_ = (GtkOverlay*) gtk_overlay_new ();
	g_object_ref_sink (_tmp0_);
	overlay = _tmp0_;
	_tmp1_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp1_);
	box = _tmp1_;
	_tmp2_ = widgets_create_close_button ();
	close_button = _tmp2_;
	_tmp3_ = close_button;
	g_signal_connect_object ((WidgetsClickEventBox*) _tmp3_, "clicked", (GCallback) ___lambda81__widgets_click_event_box_clicked, self, 0);
	_tmp4_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	g_object_ref_sink (_tmp4_);
	close_button_box = _tmp4_;
	_tmp5_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	g_object_ref_sink (_tmp5_);
	content_button_box = _tmp5_;
	_tmp6_ = content_button_box;
	gtk_widget_set_margin_top ((GtkWidget*) _tmp6_, self->priv->box_margin_top);
	_tmp7_ = content_button_box;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp7_, self->priv->box_margin_bottom);
	_tmp8_ = content_button_box;
	gtk_widget_set_margin_end ((GtkWidget*) _tmp8_, self->priv->box_margin_end);
	_tmp9_ = utils_get_image_path ("dialog_icon.svg");
	_tmp10_ = _tmp9_;
	_tmp11_ = (GtkImage*) gtk_image_new_from_file (_tmp10_);
	g_object_ref_sink (_tmp11_);
	_tmp12_ = _tmp11_;
	_g_free0 (_tmp10_);
	logo_image = _tmp12_;
	_tmp13_ = logo_image;
	gtk_widget_set_margin_start ((GtkWidget*) _tmp13_, self->priv->logo_margin_start);
	_tmp14_ = logo_image;
	gtk_widget_set_margin_end ((GtkWidget*) _tmp14_, self->priv->logo_margin_end);
	_tmp15_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp15_);
	label_box = _tmp15_;
	_tmp16_ = (GtkLabel*) gtk_label_new (NULL);
	g_object_ref_sink (_tmp16_);
	title_label = _tmp16_;
	_tmp17_ = title_label;
	gtk_widget_set_halign ((GtkWidget*) _tmp17_, GTK_ALIGN_START);
	_tmp18_ = title_label;
	_tmp19_ = gtk_widget_get_style_context ((GtkWidget*) _tmp18_);
	gtk_style_context_add_class (_tmp19_, "dialog_title");
	_tmp20_ = title_label;
	gtk_label_set_text (_tmp20_, title);
	_tmp21_ = title_label;
	gtk_widget_set_margin_top ((GtkWidget*) _tmp21_, self->priv->title_margin_top);
	_tmp22_ = (GtkLabel*) gtk_label_new (NULL);
	g_object_ref_sink (_tmp22_);
	content_label = _tmp22_;
	_tmp23_ = content_label;
	gtk_widget_set_halign ((GtkWidget*) _tmp23_, GTK_ALIGN_START);
	_tmp24_ = content_label;
	_tmp25_ = gtk_widget_get_style_context ((GtkWidget*) _tmp24_);
	gtk_style_context_add_class (_tmp25_, "dialog_content");
	_tmp26_ = content_label;
	gtk_label_set_text (_tmp26_, content);
	_tmp27_ = content_label;
	gtk_widget_set_margin_top ((GtkWidget*) _tmp27_, self->priv->content_margin_top);
	_tmp28_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	g_object_ref_sink (_tmp28_);
	button_box = _tmp28_;
	if (g_strcmp0 (cancel_text, "") != 0) {
		GdkScreen* _tmp29_;
		WidgetsDialogButton* _tmp30_;
		WidgetsDialogButton* _tmp31_;
		_tmp29_ = ((WidgetsDialog*) self)->screen_monitor;
		_tmp30_ = widgets_dialog_button_new (cancel_text, "left", "text", gdk_screen_is_composited (_tmp29_));
		g_object_ref_sink (_tmp30_);
		_g_object_unref0 (self->priv->cancel_button);
		self->priv->cancel_button = _tmp30_;
		_tmp31_ = self->priv->cancel_button;
		g_signal_connect_object ((GtkButton*) _tmp31_, "clicked", (GCallback) ____lambda82__gtk_button_clicked, self, 0);
	}
	if (g_strcmp0 (cancel_text, "") != 0) {
		GdkScreen* _tmp32_;
		WidgetsDialogButton* _tmp33_;
		_tmp32_ = ((WidgetsDialog*) self)->screen_monitor;
		_tmp33_ = widgets_dialog_button_new (confirm_text, "right", "warning", gdk_screen_is_composited (_tmp32_));
		g_object_ref_sink (_tmp33_);
		_g_object_unref0 (self->priv->confirm_button);
		self->priv->confirm_button = _tmp33_;
	} else {
		GdkScreen* _tmp34_;
		WidgetsDialogButton* _tmp35_;
		_tmp34_ = ((WidgetsDialog*) self)->screen_monitor;
		_tmp35_ = widgets_dialog_button_new (confirm_text, "middle", "warning", gdk_screen_is_composited (_tmp34_));
		g_object_ref_sink (_tmp35_);
		_g_object_unref0 (self->priv->confirm_button);
		self->priv->confirm_button = _tmp35_;
	}
	_tmp36_ = self->priv->confirm_button;
	g_signal_connect_object ((GtkButton*) _tmp36_, "clicked", (GCallback) ___lambda83__gtk_button_clicked, self, 0);
	tab_order_list = NULL;
	if (g_strcmp0 (cancel_text, "") != 0) {
		WidgetsDialogButton* _tmp37_;
		GtkWidget* _tmp38_;
		_tmp37_ = self->priv->cancel_button;
		_tmp38_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, gtk_widget_get_type (), GtkWidget));
		tab_order_list = g_list_append (tab_order_list, _tmp38_);
	}
	_tmp39_ = self->priv->confirm_button;
	_tmp40_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp39_, gtk_widget_get_type (), GtkWidget));
	tab_order_list = g_list_append (tab_order_list, _tmp40_);
	_tmp41_ = button_box;
	_tmp42_ = tab_order_list;
	gtk_container_set_focus_chain ((GtkContainer*) _tmp41_, _tmp42_);
	_tmp43_ = button_box;
	_tmp44_ = self->priv->confirm_button;
	gtk_container_set_focus_child ((GtkContainer*) _tmp43_, (GtkWidget*) _tmp44_);
	_tmp45_ = close_button_box;
	_tmp46_ = close_button;
	gtk_box_pack_start (_tmp45_, (GtkWidget*) _tmp46_, TRUE, TRUE, (guint) 0);
	_tmp47_ = label_box;
	_tmp48_ = title_label;
	gtk_box_pack_start (_tmp47_, (GtkWidget*) _tmp48_, FALSE, FALSE, (guint) 0);
	_tmp49_ = label_box;
	_tmp50_ = content_label;
	gtk_box_pack_start (_tmp49_, (GtkWidget*) _tmp50_, FALSE, FALSE, (guint) 0);
	_tmp51_ = content_button_box;
	_tmp52_ = logo_image;
	gtk_box_pack_start (_tmp51_, (GtkWidget*) _tmp52_, FALSE, FALSE, (guint) 0);
	_tmp53_ = content_button_box;
	_tmp54_ = label_box;
	gtk_box_pack_start (_tmp53_, (GtkWidget*) _tmp54_, TRUE, TRUE, (guint) 0);
	if (g_strcmp0 (cancel_text, "") != 0) {
		GtkBox* _tmp55_;
		WidgetsDialogButton* _tmp56_;
		_tmp55_ = button_box;
		_tmp56_ = self->priv->cancel_button;
		gtk_box_pack_start (_tmp55_, (GtkWidget*) _tmp56_, TRUE, TRUE, (guint) 0);
	}
	_tmp57_ = button_box;
	_tmp58_ = self->priv->confirm_button;
	gtk_box_pack_start (_tmp57_, (GtkWidget*) _tmp58_, TRUE, TRUE, (guint) 0);
	_tmp59_ = box;
	_tmp60_ = close_button_box;
	gtk_box_pack_start (_tmp59_, (GtkWidget*) _tmp60_, FALSE, FALSE, (guint) 0);
	_tmp61_ = box;
	_tmp62_ = content_button_box;
	gtk_box_pack_start (_tmp61_, (GtkWidget*) _tmp62_, TRUE, TRUE, (guint) 0);
	_tmp63_ = box;
	_tmp64_ = button_box;
	gtk_box_pack_start (_tmp63_, (GtkWidget*) _tmp64_, TRUE, TRUE, (guint) 0);
	_tmp65_ = widgets_window_event_area_new ((GtkContainer*) self);
	g_object_ref_sink (_tmp65_);
	event_area = _tmp65_;
	gtk_widget_set_margin_end ((GtkWidget*) event_area, constant_CLOSE_BUTTON_WIDTH);
	gtk_widget_set_margin_bottom ((GtkWidget*) event_area, constant_DIALOG_BUTTON_HEIGHT);
	_tmp66_ = overlay;
	_tmp67_ = box;
	gtk_container_add ((GtkContainer*) _tmp66_, (GtkWidget*) _tmp67_);
	_tmp68_ = overlay;
	gtk_overlay_add_overlay (_tmp68_, (GtkWidget*) event_area);
	_tmp69_ = overlay;
	widgets_dialog_add_widget ((WidgetsDialog*) self, (GtkWidget*) _tmp69_);
	_g_object_unref0 (event_area);
	(tab_order_list == NULL) ? NULL : (tab_order_list = (_g_list_free__g_object_unref0_ (tab_order_list), NULL));
	_g_object_unref0 (button_box);
	_g_object_unref0 (content_label);
	_g_object_unref0 (title_label);
	_g_object_unref0 (label_box);
	_g_object_unref0 (logo_image);
	_g_object_unref0 (content_button_box);
	_g_object_unref0 (close_button_box);
	_g_object_unref0 (close_button);
	_g_object_unref0 (box);
	_g_object_unref0 (overlay);
	return self;
}

WidgetsConfirmDialog*
widgets_confirm_dialog_new (const gchar* title,
                            const gchar* content,
                            const gchar* cancel_text,
                            const gchar* confirm_text)
{
	return widgets_confirm_dialog_construct (WIDGETS_TYPE_CONFIRM_DIALOG, title, content, cancel_text, confirm_text);
}

static void
widgets_confirm_dialog_class_init (WidgetsConfirmDialogClass * klass,
                                   gpointer klass_data)
{
	widgets_confirm_dialog_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &WidgetsConfirmDialog_private_offset);
	G_OBJECT_CLASS (klass)->finalize = widgets_confirm_dialog_finalize;
	widgets_confirm_dialog_signals[WIDGETS_CONFIRM_DIALOG_CANCEL_SIGNAL] = g_signal_new ("cancel", WIDGETS_TYPE_CONFIRM_DIALOG, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	widgets_confirm_dialog_signals[WIDGETS_CONFIRM_DIALOG_CONFIRM_SIGNAL] = g_signal_new ("confirm", WIDGETS_TYPE_CONFIRM_DIALOG, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
widgets_confirm_dialog_instance_init (WidgetsConfirmDialog * self,
                                      gpointer klass)
{
	self->priv = widgets_confirm_dialog_get_instance_private (self);
	self->priv->box_margin_bottom = 24;
	self->priv->box_margin_end = 20;
	self->priv->box_margin_top = 4;
	self->priv->content_margin_top = 3;
	self->priv->logo_margin_end = 20;
	self->priv->logo_margin_start = 20;
	self->priv->title_margin_top = 7;
}

static void
widgets_confirm_dialog_finalize (GObject * obj)
{
	WidgetsConfirmDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIDGETS_TYPE_CONFIRM_DIALOG, WidgetsConfirmDialog);
	_g_object_unref0 (self->priv->cancel_button);
	_g_object_unref0 (self->priv->confirm_button);
	G_OBJECT_CLASS (widgets_confirm_dialog_parent_class)->finalize (obj);
}

static GType
widgets_confirm_dialog_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (WidgetsConfirmDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) widgets_confirm_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (WidgetsConfirmDialog), 0, (GInstanceInitFunc) widgets_confirm_dialog_instance_init, NULL };
	GType widgets_confirm_dialog_type_id;
	widgets_confirm_dialog_type_id = g_type_register_static (WIDGETS_TYPE_DIALOG, "WidgetsConfirmDialog", &g_define_type_info, 0);
	WidgetsConfirmDialog_private_offset = g_type_add_instance_private (widgets_confirm_dialog_type_id, sizeof (WidgetsConfirmDialogPrivate));
	return widgets_confirm_dialog_type_id;
}

GType
widgets_confirm_dialog_get_type (void)
{
	static volatile gsize widgets_confirm_dialog_type_id__once = 0;
	if (g_once_init_enter (&widgets_confirm_dialog_type_id__once)) {
		GType widgets_confirm_dialog_type_id;
		widgets_confirm_dialog_type_id = widgets_confirm_dialog_get_type_once ();
		g_once_init_leave (&widgets_confirm_dialog_type_id__once, widgets_confirm_dialog_type_id);
	}
	return widgets_confirm_dialog_type_id__once;
}

WidgetsConfirmDialog*
widgets_create_running_confirm_dialog (WidgetsConfigWindow* window)
{
	WidgetsConfirmDialog* dialog = NULL;
	WidgetsConfirmDialog* _tmp0_;
	WidgetsConfirmDialog* result;
	g_return_val_if_fail (window != NULL, NULL);
	_tmp0_ = widgets_confirm_dialog_new (_ ("Programs are still running in terminal"), _ ("Are you sure you want to exit?"), _ ("Cancel"), _ ("Exit"));
	g_object_ref_sink (_tmp0_);
	dialog = _tmp0_;
	widgets_dialog_transient_for_window ((WidgetsDialog*) dialog, window);
	result = dialog;
	return result;
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

