/* user-prompt-box.c generated by valac 0.56.19, the Vala compiler
 * generated from user-prompt-box.vala, do not modify */

/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*-
 *
 * Copyright (C) 2011,2012 Canonical Ltd
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 3 as
 * published by the Free Software Foundation.
 *
 * 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/>.
 *
 * Authors: Robert Ancell <robert.ancell@canonical.com>
 *          Michael Terry <michael.terry@canonical.com>
 */

#include <gtk/gtk.h>
#include <glib-object.h>
#include <cairo-gobject.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <lightdm.h>
#include <glib/gstdio.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_FADABLE (fadable_get_type ())
#define FADABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FADABLE, Fadable))
#define IS_FADABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FADABLE))
#define FADABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_FADABLE, FadableIface))

typedef struct _Fadable Fadable;
typedef struct _FadableIface FadableIface;

#define TYPE_FADE_TRACKER (fade_tracker_get_type ())
#define FADE_TRACKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FADE_TRACKER, FadeTracker))
#define FADE_TRACKER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FADE_TRACKER, FadeTrackerClass))
#define IS_FADE_TRACKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FADE_TRACKER))
#define IS_FADE_TRACKER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FADE_TRACKER))
#define FADE_TRACKER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FADE_TRACKER, FadeTrackerClass))

typedef struct _FadeTracker FadeTracker;
typedef struct _FadeTrackerClass FadeTrackerClass;

#define TYPE_FADABLE_BOX (fadable_box_get_type ())
#define FADABLE_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FADABLE_BOX, FadableBox))
#define FADABLE_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FADABLE_BOX, FadableBoxClass))
#define IS_FADABLE_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FADABLE_BOX))
#define IS_FADABLE_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FADABLE_BOX))
#define FADABLE_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FADABLE_BOX, FadableBoxClass))

typedef struct _FadableBox FadableBox;
typedef struct _FadableBoxClass FadableBoxClass;
typedef struct _FadableBoxPrivate FadableBoxPrivate;

#define TYPE_PROMPT_BOX (prompt_box_get_type ())
#define PROMPT_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PROMPT_BOX, PromptBox))
#define PROMPT_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PROMPT_BOX, PromptBoxClass))
#define IS_PROMPT_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PROMPT_BOX))
#define IS_PROMPT_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PROMPT_BOX))
#define PROMPT_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PROMPT_BOX, PromptBoxClass))

typedef struct _PromptBox PromptBox;
typedef struct _PromptBoxClass PromptBoxClass;
typedef struct _PromptBoxPrivate PromptBoxPrivate;

#define TYPE_FADING_LABEL (fading_label_get_type ())
#define FADING_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FADING_LABEL, FadingLabel))
#define FADING_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FADING_LABEL, FadingLabelClass))
#define IS_FADING_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FADING_LABEL))
#define IS_FADING_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FADING_LABEL))
#define FADING_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FADING_LABEL, FadingLabelClass))

typedef struct _FadingLabel FadingLabel;
typedef struct _FadingLabelClass FadingLabelClass;

#define TYPE_FLAT_BUTTON (flat_button_get_type ())
#define FLAT_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FLAT_BUTTON, FlatButton))
#define FLAT_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FLAT_BUTTON, FlatButtonClass))
#define IS_FLAT_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FLAT_BUTTON))
#define IS_FLAT_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FLAT_BUTTON))
#define FLAT_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FLAT_BUTTON, FlatButtonClass))

typedef struct _FlatButton FlatButton;
typedef struct _FlatButtonClass FlatButtonClass;

#define TYPE_USER_PROMPT_BOX (user_prompt_box_get_type ())
#define USER_PROMPT_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_USER_PROMPT_BOX, UserPromptBox))
#define USER_PROMPT_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_USER_PROMPT_BOX, UserPromptBoxClass))
#define IS_USER_PROMPT_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_USER_PROMPT_BOX))
#define IS_USER_PROMPT_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_USER_PROMPT_BOX))
#define USER_PROMPT_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_USER_PROMPT_BOX, UserPromptBoxClass))

typedef struct _UserPromptBox UserPromptBox;
typedef struct _UserPromptBoxClass UserPromptBoxClass;
typedef struct _UserPromptBoxPrivate UserPromptBoxPrivate;
enum  {
	USER_PROMPT_BOX_0_PROPERTY,
	USER_PROMPT_BOX_USERNAME_PROPERTY,
	USER_PROMPT_BOX_NUM_PROPERTIES
};
static GParamSpec* user_prompt_box_properties[USER_PROMPT_BOX_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _FadableIface {
	GTypeInterface parent_iface;
	FadeTracker* (*get_fade_tracker) (Fadable* self);
	void (*set_fade_tracker) (Fadable* self, FadeTracker* value);
};

struct _FadableBox {
	GtkEventBox parent_instance;
	FadableBoxPrivate * priv;
};

struct _FadableBoxClass {
	GtkEventBoxClass parent_class;
	void (*draw_full_alpha) (FadableBox* self, cairo_t* c);
};

struct _PromptBox {
	FadableBox parent_instance;
	PromptBoxPrivate * priv;
	GtkGrid* box_grid;
	GtkGrid* name_grid;
	FadingLabel* name_label;
	FlatButton* option_button;
	GtkWidget* small_box_widget;
	FadingLabel* small_name_label;
	gint start_row;
	gint last_row;
};

struct _PromptBoxClass {
	FadableBoxClass parent_class;
	GtkGrid* (*create_name_grid) (PromptBox* self);
	GtkGrid* (*create_small_name_grid) (PromptBox* self);
	void (*set_start_row) (PromptBox* self);
	void (*reset_last_row) (PromptBox* self);
	void (*add_static_prompts) (PromptBox* self);
};

struct _UserPromptBox {
	PromptBox parent_instance;
	UserPromptBoxPrivate * priv;
	gchar* background;
	gchar* session;
	gboolean is_active;
};

struct _UserPromptBoxClass {
	PromptBoxClass parent_class;
};

struct _UserPromptBoxPrivate {
	gchar* _username;
};

static gint UserPromptBox_private_offset;
static gpointer user_prompt_box_parent_class = NULL;

VALA_EXTERN GType fade_tracker_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FadeTracker, g_object_unref)
VALA_EXTERN GType fadable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Fadable, g_object_unref)
VALA_EXTERN GType fadable_box_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FadableBox, g_object_unref)
VALA_EXTERN GType prompt_box_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PromptBox, g_object_unref)
VALA_EXTERN GType fading_label_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FadingLabel, g_object_unref)
VALA_EXTERN GType flat_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FlatButton, g_object_unref)
VALA_EXTERN GType user_prompt_box_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UserPromptBox, g_object_unref)
VALA_EXTERN UserPromptBox* user_prompt_box_new (const gchar* name);
VALA_EXTERN UserPromptBox* user_prompt_box_construct (GType object_type,
                                          const gchar* name);
VALA_EXTERN void user_prompt_box_set_username (UserPromptBox* self,
                                   const gchar* value);
static void user_prompt_box_update_avatar (UserPromptBox* self);
VALA_EXTERN const gchar* user_prompt_box_get_username (UserPromptBox* self);
VALA_EXTERN void prompt_box_set_avatar_path (PromptBox* self,
                                 const gchar* path);
static void user_prompt_box_finalize (GObject * obj);
static GType user_prompt_box_get_type_once (void);
static void _vala_user_prompt_box_get_property (GObject * object,
                                         guint property_id,
                                         GValue * value,
                                         GParamSpec * pspec);
static void _vala_user_prompt_box_set_property (GObject * object,
                                         guint property_id,
                                         const GValue * value,
                                         GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
user_prompt_box_get_instance_private (UserPromptBox* self)
{
	return G_STRUCT_MEMBER_P (self, UserPromptBox_private_offset);
}

UserPromptBox*
user_prompt_box_construct (GType object_type,
                           const gchar* name)
{
	UserPromptBox * self = NULL;
#line 45 "../src/user-prompt-box.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 47 "../src/user-prompt-box.vala"
	self = (UserPromptBox*) g_object_new (object_type, "id", name, NULL);
#line 48 "../src/user-prompt-box.vala"
	user_prompt_box_set_username (self, name);
#line 45 "../src/user-prompt-box.vala"
	return self;
#line 249 "user-prompt-box.c"
}

UserPromptBox*
user_prompt_box_new (const gchar* name)
{
#line 45 "../src/user-prompt-box.vala"
	return user_prompt_box_construct (TYPE_USER_PROMPT_BOX, name);
#line 257 "user-prompt-box.c"
}

static gpointer
_g_object_ref0 (gpointer self)
{
#line 56 "../src/user-prompt-box.vala"
	return self ? g_object_ref (self) : NULL;
#line 265 "user-prompt-box.c"
}

static void
user_prompt_box_update_avatar (UserPromptBox* self)
{
	gchar* avatar_path = NULL;
	LightDMUserList* users = NULL;
	LightDMUserList* _tmp0_;
	LightDMUserList* _tmp1_;
	LightDMUserList* _tmp2_;
	GList* _tmp3_;
	GList* _tmp4_;
	gboolean _tmp15_ = FALSE;
	const gchar* _tmp16_;
	const gchar* _tmp27_;
#line 51 "../src/user-prompt-box.vala"
	g_return_if_fail (self != NULL);
#line 53 "../src/user-prompt-box.vala"
	avatar_path = NULL;
#line 56 "../src/user-prompt-box.vala"
	_tmp0_ = lightdm_user_list_get_instance ();
#line 56 "../src/user-prompt-box.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 56 "../src/user-prompt-box.vala"
	users = _tmp1_;
#line 57 "../src/user-prompt-box.vala"
	_tmp2_ = users;
#line 57 "../src/user-prompt-box.vala"
	_tmp3_ = lightdm_user_list_get_users (_tmp2_);
#line 57 "../src/user-prompt-box.vala"
	_tmp4_ = _tmp3_;
#line 297 "user-prompt-box.c"
	{
		GList* user_collection = NULL;
		GList* user_it = NULL;
#line 57 "../src/user-prompt-box.vala"
		user_collection = _tmp4_;
#line 57 "../src/user-prompt-box.vala"
		for (user_it = user_collection; user_it != NULL; user_it = user_it->next) {
#line 305 "user-prompt-box.c"
			LightDMUser* _tmp5_;
			LightDMUser* user = NULL;
#line 57 "../src/user-prompt-box.vala"
			_tmp5_ = _g_object_ref0 ((LightDMUser*) user_it->data);
#line 57 "../src/user-prompt-box.vala"
			user = _tmp5_;
#line 312 "user-prompt-box.c"
			{
				LightDMUser* _tmp6_;
				const gchar* _tmp7_;
				const gchar* _tmp8_;
				const gchar* _tmp9_;
				const gchar* _tmp10_;
#line 58 "../src/user-prompt-box.vala"
				_tmp6_ = user;
#line 58 "../src/user-prompt-box.vala"
				_tmp7_ = lightdm_user_get_name (_tmp6_);
#line 58 "../src/user-prompt-box.vala"
				_tmp8_ = _tmp7_;
#line 58 "../src/user-prompt-box.vala"
				_tmp9_ = user_prompt_box_get_username (self);
#line 58 "../src/user-prompt-box.vala"
				_tmp10_ = _tmp9_;
#line 58 "../src/user-prompt-box.vala"
				if (g_strcmp0 (_tmp8_, _tmp10_) == 0) {
#line 331 "user-prompt-box.c"
					LightDMUser* _tmp11_;
					const gchar* _tmp12_;
					const gchar* _tmp13_;
					gchar* _tmp14_;
#line 59 "../src/user-prompt-box.vala"
					_tmp11_ = user;
#line 59 "../src/user-prompt-box.vala"
					_tmp12_ = lightdm_user_get_image (_tmp11_);
#line 59 "../src/user-prompt-box.vala"
					_tmp13_ = _tmp12_;
#line 59 "../src/user-prompt-box.vala"
					_tmp14_ = g_strdup (_tmp13_);
#line 59 "../src/user-prompt-box.vala"
					_g_free0 (avatar_path);
#line 59 "../src/user-prompt-box.vala"
					avatar_path = _tmp14_;
#line 60 "../src/user-prompt-box.vala"
					_g_object_unref0 (user);
#line 60 "../src/user-prompt-box.vala"
					break;
#line 352 "user-prompt-box.c"
				}
#line 57 "../src/user-prompt-box.vala"
				_g_object_unref0 (user);
#line 356 "user-prompt-box.c"
			}
		}
	}
#line 65 "../src/user-prompt-box.vala"
	_tmp16_ = avatar_path;
#line 65 "../src/user-prompt-box.vala"
	if (_tmp16_ == NULL) {
#line 65 "../src/user-prompt-box.vala"
		_tmp15_ = TRUE;
#line 366 "user-prompt-box.c"
	} else {
		const gchar* _tmp17_;
#line 65 "../src/user-prompt-box.vala"
		_tmp17_ = avatar_path;
#line 65 "../src/user-prompt-box.vala"
		_tmp15_ = !g_file_test (_tmp17_, G_FILE_TEST_EXISTS);
#line 373 "user-prompt-box.c"
	}
#line 65 "../src/user-prompt-box.vala"
	if (_tmp15_) {
#line 377 "user-prompt-box.c"
		gchar** possible_paths = NULL;
		const gchar* _tmp18_;
		const gchar* _tmp19_;
		gchar* _tmp20_;
		gchar** _tmp21_;
		gint possible_paths_length1;
		gint _possible_paths_size_;
		gchar** _tmp22_;
		gint _tmp22__length1;
#line 66 "../src/user-prompt-box.vala"
		_tmp18_ = user_prompt_box_get_username (self);
#line 66 "../src/user-prompt-box.vala"
		_tmp19_ = _tmp18_;
#line 66 "../src/user-prompt-box.vala"
		_tmp20_ = g_strconcat ("/var/lib/AccountsService/icons/", _tmp19_, NULL);
#line 66 "../src/user-prompt-box.vala"
		_tmp21_ = g_new0 (gchar*, 1 + 1);
#line 66 "../src/user-prompt-box.vala"
		_tmp21_[0] = _tmp20_;
#line 66 "../src/user-prompt-box.vala"
		possible_paths = _tmp21_;
#line 66 "../src/user-prompt-box.vala"
		possible_paths_length1 = 1;
#line 66 "../src/user-prompt-box.vala"
		_possible_paths_size_ = possible_paths_length1;
#line 69 "../src/user-prompt-box.vala"
		_tmp22_ = possible_paths;
#line 69 "../src/user-prompt-box.vala"
		_tmp22__length1 = possible_paths_length1;
#line 407 "user-prompt-box.c"
		{
			gchar** path_collection = NULL;
			gint path_collection_length1 = 0;
			gint _path_collection_size_ = 0;
			gint path_it = 0;
#line 69 "../src/user-prompt-box.vala"
			path_collection = _tmp22_;
#line 69 "../src/user-prompt-box.vala"
			path_collection_length1 = _tmp22__length1;
#line 69 "../src/user-prompt-box.vala"
			for (path_it = 0; path_it < path_collection_length1; path_it = path_it + 1) {
#line 419 "user-prompt-box.c"
				gchar* _tmp23_;
				gchar* path = NULL;
#line 69 "../src/user-prompt-box.vala"
				_tmp23_ = g_strdup (path_collection[path_it]);
#line 69 "../src/user-prompt-box.vala"
				path = _tmp23_;
#line 426 "user-prompt-box.c"
				{
					const gchar* _tmp24_;
#line 70 "../src/user-prompt-box.vala"
					_tmp24_ = path;
#line 70 "../src/user-prompt-box.vala"
					if (g_file_test (_tmp24_, G_FILE_TEST_EXISTS)) {
#line 433 "user-prompt-box.c"
						const gchar* _tmp25_;
						gchar* _tmp26_;
#line 71 "../src/user-prompt-box.vala"
						_tmp25_ = path;
#line 71 "../src/user-prompt-box.vala"
						_tmp26_ = g_strdup (_tmp25_);
#line 71 "../src/user-prompt-box.vala"
						_g_free0 (avatar_path);
#line 71 "../src/user-prompt-box.vala"
						avatar_path = _tmp26_;
#line 72 "../src/user-prompt-box.vala"
						_g_free0 (path);
#line 72 "../src/user-prompt-box.vala"
						break;
#line 448 "user-prompt-box.c"
					}
#line 69 "../src/user-prompt-box.vala"
					_g_free0 (path);
#line 452 "user-prompt-box.c"
				}
			}
		}
#line 65 "../src/user-prompt-box.vala"
		possible_paths = (_vala_array_free (possible_paths, possible_paths_length1, (GDestroyNotify) g_free), NULL);
#line 458 "user-prompt-box.c"
	}
#line 77 "../src/user-prompt-box.vala"
	_tmp27_ = avatar_path;
#line 77 "../src/user-prompt-box.vala"
	prompt_box_set_avatar_path ((PromptBox*) self, _tmp27_);
#line 51 "../src/user-prompt-box.vala"
	_g_object_unref0 (users);
#line 51 "../src/user-prompt-box.vala"
	_g_free0 (avatar_path);
#line 468 "user-prompt-box.c"
}

const gchar*
user_prompt_box_get_username (UserPromptBox* self)
{
	const gchar* result;
	const gchar* _tmp0_;
#line 37 "../src/user-prompt-box.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 37 "../src/user-prompt-box.vala"
	_tmp0_ = self->priv->_username;
#line 37 "../src/user-prompt-box.vala"
	result = _tmp0_;
#line 37 "../src/user-prompt-box.vala"
	return result;
#line 484 "user-prompt-box.c"
}

void
user_prompt_box_set_username (UserPromptBox* self,
                              const gchar* value)
{
	gchar* _tmp0_;
#line 38 "../src/user-prompt-box.vala"
	g_return_if_fail (self != NULL);
#line 40 "../src/user-prompt-box.vala"
	_tmp0_ = g_strdup (value);
#line 40 "../src/user-prompt-box.vala"
	_g_free0 (self->priv->_username);
#line 40 "../src/user-prompt-box.vala"
	self->priv->_username = _tmp0_;
#line 41 "../src/user-prompt-box.vala"
	user_prompt_box_update_avatar (self);
#line 38 "../src/user-prompt-box.vala"
	g_object_notify_by_pspec ((GObject *) self, user_prompt_box_properties[USER_PROMPT_BOX_USERNAME_PROPERTY]);
#line 504 "user-prompt-box.c"
}

static void
user_prompt_box_class_init (UserPromptBoxClass * klass,
                            gpointer klass_data)
{
#line 23 "../src/user-prompt-box.vala"
	user_prompt_box_parent_class = g_type_class_peek_parent (klass);
#line 23 "../src/user-prompt-box.vala"
	g_type_class_adjust_private_offset (klass, &UserPromptBox_private_offset);
#line 23 "../src/user-prompt-box.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_user_prompt_box_get_property;
#line 23 "../src/user-prompt-box.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_user_prompt_box_set_property;
#line 23 "../src/user-prompt-box.vala"
	G_OBJECT_CLASS (klass)->finalize = user_prompt_box_finalize;
#line 23 "../src/user-prompt-box.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), USER_PROMPT_BOX_USERNAME_PROPERTY, user_prompt_box_properties[USER_PROMPT_BOX_USERNAME_PROPERTY] = g_param_spec_string ("username", "username", "username", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 523 "user-prompt-box.c"
}

static void
user_prompt_box_instance_init (UserPromptBox * self,
                               gpointer klass)
{
#line 23 "../src/user-prompt-box.vala"
	self->priv = user_prompt_box_get_instance_private (self);
#line 532 "user-prompt-box.c"
}

static void
user_prompt_box_finalize (GObject * obj)
{
	UserPromptBox * self;
#line 23 "../src/user-prompt-box.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_USER_PROMPT_BOX, UserPromptBox);
#line 26 "../src/user-prompt-box.vala"
	_g_free0 (self->background);
#line 29 "../src/user-prompt-box.vala"
	_g_free0 (self->session);
#line 34 "../src/user-prompt-box.vala"
	_g_free0 (self->priv->_username);
#line 23 "../src/user-prompt-box.vala"
	G_OBJECT_CLASS (user_prompt_box_parent_class)->finalize (obj);
#line 549 "user-prompt-box.c"
}

static GType
user_prompt_box_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (UserPromptBoxClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) user_prompt_box_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UserPromptBox), 0, (GInstanceInitFunc) user_prompt_box_instance_init, NULL };
	GType user_prompt_box_type_id;
	user_prompt_box_type_id = g_type_register_static (TYPE_PROMPT_BOX, "UserPromptBox", &g_define_type_info, 0);
	UserPromptBox_private_offset = g_type_add_instance_private (user_prompt_box_type_id, sizeof (UserPromptBoxPrivate));
	return user_prompt_box_type_id;
}

GType
user_prompt_box_get_type (void)
{
	static volatile gsize user_prompt_box_type_id__once = 0;
	if (g_once_init_enter (&user_prompt_box_type_id__once)) {
		GType user_prompt_box_type_id;
		user_prompt_box_type_id = user_prompt_box_get_type_once ();
		g_once_init_leave (&user_prompt_box_type_id__once, user_prompt_box_type_id);
	}
	return user_prompt_box_type_id__once;
}

static void
_vala_user_prompt_box_get_property (GObject * object,
                                    guint property_id,
                                    GValue * value,
                                    GParamSpec * pspec)
{
	UserPromptBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_USER_PROMPT_BOX, UserPromptBox);
#line 23 "../src/user-prompt-box.vala"
	switch (property_id) {
#line 23 "../src/user-prompt-box.vala"
		case USER_PROMPT_BOX_USERNAME_PROPERTY:
#line 23 "../src/user-prompt-box.vala"
		g_value_set_string (value, user_prompt_box_get_username (self));
#line 23 "../src/user-prompt-box.vala"
		break;
#line 590 "user-prompt-box.c"
		default:
#line 23 "../src/user-prompt-box.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 23 "../src/user-prompt-box.vala"
		break;
#line 596 "user-prompt-box.c"
	}
}

static void
_vala_user_prompt_box_set_property (GObject * object,
                                    guint property_id,
                                    const GValue * value,
                                    GParamSpec * pspec)
{
	UserPromptBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_USER_PROMPT_BOX, UserPromptBox);
#line 23 "../src/user-prompt-box.vala"
	switch (property_id) {
#line 23 "../src/user-prompt-box.vala"
		case USER_PROMPT_BOX_USERNAME_PROPERTY:
#line 23 "../src/user-prompt-box.vala"
		user_prompt_box_set_username (self, g_value_get_string (value));
#line 23 "../src/user-prompt-box.vala"
		break;
#line 616 "user-prompt-box.c"
		default:
#line 23 "../src/user-prompt-box.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 23 "../src/user-prompt-box.vala"
		break;
#line 622 "user-prompt-box.c"
	}
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

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

