/* about_dialog.c generated by valac 0.56.17, the Vala compiler
 * generated from about_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 <pango/pango.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 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_ABOUT_DIALOG (widgets_about_dialog_get_type ())
#define WIDGETS_ABOUT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_ABOUT_DIALOG, WidgetsAboutDialog))
#define WIDGETS_ABOUT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_ABOUT_DIALOG, WidgetsAboutDialogClass))
#define WIDGETS_IS_ABOUT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_ABOUT_DIALOG))
#define WIDGETS_IS_ABOUT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_ABOUT_DIALOG))
#define WIDGETS_ABOUT_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_ABOUT_DIALOG, WidgetsAboutDialogClass))

typedef struct _WidgetsAboutDialog WidgetsAboutDialog;
typedef struct _WidgetsAboutDialogClass WidgetsAboutDialogClass;
typedef struct _WidgetsAboutDialogPrivate WidgetsAboutDialogPrivate;
enum  {
	WIDGETS_ABOUT_DIALOG_0_PROPERTY,
	WIDGETS_ABOUT_DIALOG_NUM_PROPERTIES
};
static GParamSpec* widgets_about_dialog_properties[WIDGETS_ABOUT_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 WIDGETS_TYPE_ABOUT_WIDGET (widgets_about_widget_get_type ())
#define WIDGETS_ABOUT_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_ABOUT_WIDGET, WidgetsAboutWidget))
#define WIDGETS_ABOUT_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_ABOUT_WIDGET, WidgetsAboutWidgetClass))
#define WIDGETS_IS_ABOUT_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_ABOUT_WIDGET))
#define WIDGETS_IS_ABOUT_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_ABOUT_WIDGET))
#define WIDGETS_ABOUT_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_ABOUT_WIDGET, WidgetsAboutWidgetClass))

typedef struct _WidgetsAboutWidget WidgetsAboutWidget;
typedef struct _WidgetsAboutWidgetClass WidgetsAboutWidgetClass;
typedef struct _WidgetsAboutWidgetPrivate WidgetsAboutWidgetPrivate;

#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;

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 _WidgetsAboutDialog {
	WidgetsDialog parent_instance;
	WidgetsAboutDialogPrivate * priv;
	GtkWidget* focus_widget;
};

struct _WidgetsAboutDialogClass {
	WidgetsDialogClass parent_class;
};

struct _WidgetsAboutWidget {
	GtkBox parent_instance;
	WidgetsAboutWidgetPrivate * priv;
	cairo_surface_t* icon_surface;
	cairo_surface_t* logo_surface;
	gint about_height;
	gint about_x;
	gint about_y;
	gint acknowledgments_y;
	gint height;
	gint homepage_y;
	gint icon_y;
	gint logo_y;
	gint name_height;
	gint name_y;
	gint version_height;
	gint version_size;
	gint version_y;
	gchar* about_text;
	gchar* product_name_text;
};

struct _WidgetsAboutWidgetClass {
	GtkBoxClass parent_class;
};

static gpointer widgets_about_dialog_parent_class = NULL;
VALA_EXTERN gint constant_CLOSE_BUTTON_WIDTH;
VALA_EXTERN gint constant_TITLEBAR_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_about_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsAboutDialog, g_object_unref)
VALA_EXTERN WidgetsAboutDialog* widgets_about_dialog_new (GtkWidget* widget);
VALA_EXTERN WidgetsAboutDialog* widgets_about_dialog_construct (GType object_type,
                                                    GtkWidget* widget);
VALA_EXTERN WidgetsDialog* widgets_dialog_new (void);
VALA_EXTERN WidgetsDialog* widgets_dialog_construct (GType object_type);
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 __lambda152_ (WidgetsAboutDialog* self,
                   GdkEventButton* b);
static void ___lambda152__widgets_click_event_box_clicked (WidgetsClickEventBox* _sender,
                                                    GdkEventButton* event,
                                                    gpointer self);
static void __lambda153_ (WidgetsAboutDialog* self,
                   GtkWidget* w);
static void ___lambda153__gtk_widget_destroy (GtkWidget* _sender,
                                       gpointer self);
VALA_EXTERN GType widgets_about_widget_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsAboutWidget, g_object_unref)
VALA_EXTERN WidgetsAboutWidget* widgets_about_widget_new (void);
VALA_EXTERN WidgetsAboutWidget* widgets_about_widget_construct (GType object_type);
VALA_EXTERN void widgets_dialog_set_init_size (WidgetsDialog* self,
                                   gint width,
                                   gint height);
VALA_EXTERN gint draw_get_text_render_height (GtkWidget* widget,
                                  const gchar* text,
                                  gint width,
                                  gint height,
                                  gint size,
                                  PangoAlignment horizontal_alignment,
                                  const gchar* vertical_align,
                                  gint* wrap_width);
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 widgets_about_dialog_finalize (GObject * obj);
static GType widgets_about_dialog_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

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

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

static void
___lambda152__widgets_click_event_box_clicked (WidgetsClickEventBox* _sender,
                                               GdkEventButton* event,
                                               gpointer self)
{
	__lambda152_ ((WidgetsAboutDialog*) self, event);
}

static void
__lambda153_ (WidgetsAboutDialog* self,
              GtkWidget* w)
{
	GtkWidget* _tmp0_;
	g_return_if_fail (w != NULL);
	_tmp0_ = self->focus_widget;
	if (_tmp0_ != NULL) {
		GtkWidget* _tmp1_;
		_tmp1_ = self->focus_widget;
		gtk_widget_grab_focus (_tmp1_);
	}
}

static void
___lambda153__gtk_widget_destroy (GtkWidget* _sender,
                                  gpointer self)
{
	__lambda153_ ((WidgetsAboutDialog*) self, _sender);
}

WidgetsAboutDialog*
widgets_about_dialog_construct (GType object_type,
                                GtkWidget* widget)
{
	WidgetsAboutDialog * self = NULL;
	GtkWidget* _tmp0_;
	GtkOverlay* overlay = NULL;
	GtkOverlay* _tmp1_;
	WidgetsWindowButton* close_button = NULL;
	WidgetsWindowButton* _tmp2_;
	WidgetsWindowButton* _tmp3_;
	GtkBox* button_box = NULL;
	GtkBox* _tmp4_;
	GtkBox* _tmp5_;
	WidgetsWindowButton* _tmp6_;
	GtkBox* box = NULL;
	GtkBox* _tmp7_;
	GtkBox* _tmp8_;
	GtkBox* _tmp9_;
	WidgetsAboutWidget* about_widget = NULL;
	WidgetsAboutWidget* _tmp10_;
	GtkBox* _tmp11_;
	WidgetsAboutWidget* _tmp12_;
	gint about_text_height = 0;
	WidgetsAboutWidget* _tmp13_;
	WidgetsAboutWidget* _tmp14_;
	const gchar* _tmp15_;
	WidgetsAboutWidget* _tmp16_;
	WidgetsAboutWidget* _tmp17_;
	WidgetsAboutWidget* _tmp18_;
	WidgetsAboutWidget* _tmp19_;
	gint _tmp20_;
	WidgetsWindowEventArea* event_area = NULL;
	WidgetsWindowEventArea* _tmp21_;
	WidgetsWindowEventArea* _tmp22_;
	GdkScreen* _tmp23_;
	GtkOverlay* _tmp26_;
	GtkBox* _tmp27_;
	GtkOverlay* _tmp28_;
	WidgetsWindowEventArea* _tmp29_;
	GtkOverlay* _tmp30_;
	self = (WidgetsAboutDialog*) widgets_dialog_construct (object_type);
	_tmp0_ = _g_object_ref0 (widget);
	_g_object_unref0 (self->focus_widget);
	self->focus_widget = _tmp0_;
	_tmp1_ = (GtkOverlay*) gtk_overlay_new ();
	g_object_ref_sink (_tmp1_);
	overlay = _tmp1_;
	_tmp2_ = widgets_create_close_button ();
	close_button = _tmp2_;
	_tmp3_ = close_button;
	g_signal_connect_object ((WidgetsClickEventBox*) _tmp3_, "clicked", (GCallback) ___lambda152__widgets_click_event_box_clicked, self, 0);
	g_signal_connect_object ((GtkWidget*) self, "destroy", (GCallback) ___lambda153__gtk_widget_destroy, self, 0);
	_tmp4_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	g_object_ref_sink (_tmp4_);
	button_box = _tmp4_;
	_tmp5_ = button_box;
	_tmp6_ = close_button;
	gtk_box_pack_start (_tmp5_, (GtkWidget*) _tmp6_, TRUE, TRUE, (guint) 0);
	_tmp7_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp7_);
	box = _tmp7_;
	_tmp8_ = box;
	_tmp9_ = button_box;
	gtk_box_pack_start (_tmp8_, (GtkWidget*) _tmp9_, FALSE, FALSE, (guint) 0);
	_tmp10_ = widgets_about_widget_new ();
	g_object_ref_sink (_tmp10_);
	about_widget = _tmp10_;
	_tmp11_ = box;
	_tmp12_ = about_widget;
	gtk_box_pack_start (_tmp11_, (GtkWidget*) _tmp12_, TRUE, TRUE, (guint) 0);
	widgets_dialog_set_init_size ((WidgetsDialog*) self, 500, 460);
	_tmp13_ = about_widget;
	_tmp14_ = about_widget;
	_tmp15_ = _tmp14_->about_text;
	_tmp16_ = about_widget;
	_tmp17_ = about_widget;
	_tmp18_ = about_widget;
	_tmp19_ = about_widget;
	_tmp20_ = ((WidgetsDialog*) self)->window_init_width - (_tmp19_->about_x * 2);
	about_text_height = draw_get_text_render_height ((GtkWidget*) _tmp13_, _tmp15_, ((WidgetsDialog*) self)->window_init_width - (_tmp16_->about_x * 2), _tmp17_->about_height, _tmp18_->about_height, PANGO_ALIGN_LEFT, "top", &_tmp20_);
	((WidgetsDialog*) self)->window_init_height = ((WidgetsDialog*) self)->window_init_height + about_text_height;
	_tmp21_ = widgets_window_event_area_new ((GtkContainer*) self);
	g_object_ref_sink (_tmp21_);
	event_area = _tmp21_;
	_tmp22_ = event_area;
	gtk_widget_set_margin_end ((GtkWidget*) _tmp22_, constant_CLOSE_BUTTON_WIDTH);
	_tmp23_ = ((WidgetsDialog*) self)->screen_monitor;
	if (gdk_screen_is_composited (_tmp23_)) {
		WidgetsWindowEventArea* _tmp24_;
		_tmp24_ = event_area;
		gtk_widget_set_margin_bottom ((GtkWidget*) _tmp24_, ((((WidgetsDialog*) self)->window_init_height - ((WidgetsDialog*) self)->window_frame_margin_top) - ((WidgetsDialog*) self)->window_frame_margin_bottom) - constant_TITLEBAR_HEIGHT);
	} else {
		WidgetsWindowEventArea* _tmp25_;
		_tmp25_ = event_area;
		gtk_widget_set_margin_bottom ((GtkWidget*) _tmp25_, ((WidgetsDialog*) self)->window_init_height - constant_TITLEBAR_HEIGHT);
	}
	_tmp26_ = overlay;
	_tmp27_ = box;
	gtk_container_add ((GtkContainer*) _tmp26_, (GtkWidget*) _tmp27_);
	_tmp28_ = overlay;
	_tmp29_ = event_area;
	gtk_overlay_add_overlay (_tmp28_, (GtkWidget*) _tmp29_);
	_tmp30_ = overlay;
	widgets_dialog_add_widget ((WidgetsDialog*) self, (GtkWidget*) _tmp30_);
	_g_object_unref0 (event_area);
	_g_object_unref0 (about_widget);
	_g_object_unref0 (box);
	_g_object_unref0 (button_box);
	_g_object_unref0 (close_button);
	_g_object_unref0 (overlay);
	return self;
}

WidgetsAboutDialog*
widgets_about_dialog_new (GtkWidget* widget)
{
	return widgets_about_dialog_construct (WIDGETS_TYPE_ABOUT_DIALOG, widget);
}

static void
widgets_about_dialog_class_init (WidgetsAboutDialogClass * klass,
                                 gpointer klass_data)
{
	widgets_about_dialog_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = widgets_about_dialog_finalize;
}

static void
widgets_about_dialog_instance_init (WidgetsAboutDialog * self,
                                    gpointer klass)
{
}

static void
widgets_about_dialog_finalize (GObject * obj)
{
	WidgetsAboutDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIDGETS_TYPE_ABOUT_DIALOG, WidgetsAboutDialog);
	_g_object_unref0 (self->focus_widget);
	G_OBJECT_CLASS (widgets_about_dialog_parent_class)->finalize (obj);
}

static GType
widgets_about_dialog_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (WidgetsAboutDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) widgets_about_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (WidgetsAboutDialog), 0, (GInstanceInitFunc) widgets_about_dialog_instance_init, NULL };
	GType widgets_about_dialog_type_id;
	widgets_about_dialog_type_id = g_type_register_static (WIDGETS_TYPE_DIALOG, "WidgetsAboutDialog", &g_define_type_info, 0);
	return widgets_about_dialog_type_id;
}

GType
widgets_about_dialog_get_type (void)
{
	static volatile gsize widgets_about_dialog_type_id__once = 0;
	if (g_once_init_enter (&widgets_about_dialog_type_id__once)) {
		GType widgets_about_dialog_type_id;
		widgets_about_dialog_type_id = widgets_about_dialog_get_type_once ();
		g_once_init_leave (&widgets_about_dialog_type_id__once, widgets_about_dialog_type_id);
	}
	return widgets_about_dialog_type_id__once;
}

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;
}

