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

/*
* Copyright (c) 2018-2026 (https://github.com/phase1geo/Minder)
*
* 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 2 of the License, or (at your option) 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, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*
* Authored by: Trevor Williams <phase1geo@gmail.com>
*/

#include <glib-object.h>
#include <glib.h>
#include <stdlib.h>
#include <string.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_LAYOUTS (layouts_get_type ())
#define LAYOUTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LAYOUTS, Layouts))
#define LAYOUTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LAYOUTS, LayoutsClass))
#define IS_LAYOUTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LAYOUTS))
#define IS_LAYOUTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LAYOUTS))
#define LAYOUTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LAYOUTS, LayoutsClass))

typedef struct _Layouts Layouts;
typedef struct _LayoutsClass LayoutsClass;
typedef struct _LayoutsPrivate LayoutsPrivate;

#define TYPE_LAYOUT (layout_get_type ())
#define LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LAYOUT, Layout))
#define LAYOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LAYOUT, LayoutClass))
#define IS_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LAYOUT))
#define IS_LAYOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LAYOUT))
#define LAYOUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LAYOUT, LayoutClass))

typedef struct _Layout Layout;
typedef struct _LayoutClass LayoutClass;
enum  {
	LAYOUTS_0_PROPERTY,
	LAYOUTS_NUM_PROPERTIES
};
static GParamSpec* layouts_properties[LAYOUTS_NUM_PROPERTIES];
#define _g_array_unref0(var) ((var == NULL) ? NULL : (var = (g_array_unref (var), NULL)))

#define TYPE_LAYOUT_MANUAL (layout_manual_get_type ())
#define LAYOUT_MANUAL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LAYOUT_MANUAL, LayoutManual))
#define LAYOUT_MANUAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LAYOUT_MANUAL, LayoutManualClass))
#define IS_LAYOUT_MANUAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LAYOUT_MANUAL))
#define IS_LAYOUT_MANUAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LAYOUT_MANUAL))
#define LAYOUT_MANUAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LAYOUT_MANUAL, LayoutManualClass))

typedef struct _LayoutManual LayoutManual;
typedef struct _LayoutManualClass LayoutManualClass;

#define TYPE_LAYOUT_VERTICAL (layout_vertical_get_type ())
#define LAYOUT_VERTICAL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LAYOUT_VERTICAL, LayoutVertical))
#define LAYOUT_VERTICAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LAYOUT_VERTICAL, LayoutVerticalClass))
#define IS_LAYOUT_VERTICAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LAYOUT_VERTICAL))
#define IS_LAYOUT_VERTICAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LAYOUT_VERTICAL))
#define LAYOUT_VERTICAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LAYOUT_VERTICAL, LayoutVerticalClass))

typedef struct _LayoutVertical LayoutVertical;
typedef struct _LayoutVerticalClass LayoutVerticalClass;

#define TYPE_LAYOUT_HORIZONTAL (layout_horizontal_get_type ())
#define LAYOUT_HORIZONTAL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LAYOUT_HORIZONTAL, LayoutHorizontal))
#define LAYOUT_HORIZONTAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LAYOUT_HORIZONTAL, LayoutHorizontalClass))
#define IS_LAYOUT_HORIZONTAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LAYOUT_HORIZONTAL))
#define IS_LAYOUT_HORIZONTAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LAYOUT_HORIZONTAL))
#define LAYOUT_HORIZONTAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LAYOUT_HORIZONTAL, LayoutHorizontalClass))

typedef struct _LayoutHorizontal LayoutHorizontal;
typedef struct _LayoutHorizontalClass LayoutHorizontalClass;

#define TYPE_LAYOUT_LEFT (layout_left_get_type ())
#define LAYOUT_LEFT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LAYOUT_LEFT, LayoutLeft))
#define LAYOUT_LEFT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LAYOUT_LEFT, LayoutLeftClass))
#define IS_LAYOUT_LEFT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LAYOUT_LEFT))
#define IS_LAYOUT_LEFT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LAYOUT_LEFT))
#define LAYOUT_LEFT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LAYOUT_LEFT, LayoutLeftClass))

typedef struct _LayoutLeft LayoutLeft;
typedef struct _LayoutLeftClass LayoutLeftClass;

#define TYPE_LAYOUT_RIGHT (layout_right_get_type ())
#define LAYOUT_RIGHT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LAYOUT_RIGHT, LayoutRight))
#define LAYOUT_RIGHT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LAYOUT_RIGHT, LayoutRightClass))
#define IS_LAYOUT_RIGHT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LAYOUT_RIGHT))
#define IS_LAYOUT_RIGHT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LAYOUT_RIGHT))
#define LAYOUT_RIGHT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LAYOUT_RIGHT, LayoutRightClass))

typedef struct _LayoutRight LayoutRight;
typedef struct _LayoutRightClass LayoutRightClass;

#define TYPE_LAYOUT_UP (layout_up_get_type ())
#define LAYOUT_UP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LAYOUT_UP, LayoutUp))
#define LAYOUT_UP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LAYOUT_UP, LayoutUpClass))
#define IS_LAYOUT_UP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LAYOUT_UP))
#define IS_LAYOUT_UP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LAYOUT_UP))
#define LAYOUT_UP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LAYOUT_UP, LayoutUpClass))

typedef struct _LayoutUp LayoutUp;
typedef struct _LayoutUpClass LayoutUpClass;

#define TYPE_LAYOUT_DOWN (layout_down_get_type ())
#define LAYOUT_DOWN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LAYOUT_DOWN, LayoutDown))
#define LAYOUT_DOWN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LAYOUT_DOWN, LayoutDownClass))
#define IS_LAYOUT_DOWN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LAYOUT_DOWN))
#define IS_LAYOUT_DOWN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LAYOUT_DOWN))
#define LAYOUT_DOWN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LAYOUT_DOWN, LayoutDownClass))

typedef struct _LayoutDown LayoutDown;
typedef struct _LayoutDownClass LayoutDownClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _Layouts {
	GObject parent_instance;
	LayoutsPrivate * priv;
};

struct _LayoutsClass {
	GObjectClass parent_class;
};

struct _LayoutsPrivate {
	GArray* _layouts;
};

static gint Layouts_private_offset;
static gpointer layouts_parent_class = NULL;

VALA_EXTERN GType layouts_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Layouts, g_object_unref)
VALA_EXTERN GType layout_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Layout, g_object_unref)
VALA_EXTERN Layouts* layouts_new (void);
VALA_EXTERN Layouts* layouts_construct (GType object_type);
static void _g_object_unref0_ (gpointer var);
static void _vala_Layout_free_function_content_of (gpointer data);
VALA_EXTERN GType layout_manual_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LayoutManual, g_object_unref)
VALA_EXTERN LayoutManual* layout_manual_new (void);
VALA_EXTERN LayoutManual* layout_manual_construct (GType object_type);
VALA_EXTERN GType layout_vertical_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LayoutVertical, g_object_unref)
VALA_EXTERN LayoutVertical* layout_vertical_new (void);
VALA_EXTERN LayoutVertical* layout_vertical_construct (GType object_type);
VALA_EXTERN GType layout_horizontal_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LayoutHorizontal, g_object_unref)
VALA_EXTERN LayoutHorizontal* layout_horizontal_new (void);
VALA_EXTERN LayoutHorizontal* layout_horizontal_construct (GType object_type);
VALA_EXTERN GType layout_left_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LayoutLeft, g_object_unref)
VALA_EXTERN LayoutLeft* layout_left_new (void);
VALA_EXTERN LayoutLeft* layout_left_construct (GType object_type);
VALA_EXTERN GType layout_right_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LayoutRight, g_object_unref)
VALA_EXTERN LayoutRight* layout_right_new (void);
VALA_EXTERN LayoutRight* layout_right_construct (GType object_type);
VALA_EXTERN GType layout_up_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LayoutUp, g_object_unref)
VALA_EXTERN LayoutUp* layout_up_new (void);
VALA_EXTERN LayoutUp* layout_up_construct (GType object_type);
VALA_EXTERN GType layout_down_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LayoutDown, g_object_unref)
VALA_EXTERN LayoutDown* layout_down_new (void);
VALA_EXTERN LayoutDown* layout_down_construct (GType object_type);
VALA_EXTERN void layouts_get_names (Layouts* self,
                        GArray** names);
VALA_EXTERN const gchar* layout_get_name (Layout* self);
VALA_EXTERN void layouts_get_icons (Layouts* self,
                        GArray** light_icons,
                        GArray** dark_icons);
VALA_EXTERN const gchar* layout_get_light_icon (Layout* self);
VALA_EXTERN const gchar* layout_get_dark_icon (Layout* self);
VALA_EXTERN Layout* layouts_get_layout (Layouts* self,
                            const gchar* name);
VALA_EXTERN Layout* layouts_get_default (Layouts* self);
static void layouts_finalize (GObject * obj);
static GType layouts_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
layouts_get_instance_private (Layouts* self)
{
	return G_STRUCT_MEMBER_P (self, Layouts_private_offset);
}

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

static void
_vala_Layout_free_function_content_of (gpointer data)
{
	Layout* self;
	self = *((Layout**) data);
	_g_object_unref0_ (self);
}

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

Layouts*
layouts_construct (GType object_type)
{
	Layouts * self = NULL;
	GArray* _tmp0_;
	LayoutManual* manual = NULL;
	LayoutManual* _tmp1_;
	LayoutVertical* vertical = NULL;
	LayoutVertical* _tmp2_;
	LayoutHorizontal* horizontal = NULL;
	LayoutHorizontal* _tmp3_;
	LayoutLeft* left = NULL;
	LayoutLeft* _tmp4_;
	LayoutRight* right = NULL;
	LayoutRight* _tmp5_;
	LayoutUp* up = NULL;
	LayoutUp* _tmp6_;
	LayoutDown* down = NULL;
	LayoutDown* _tmp7_;
	GArray* _tmp8_;
	Layout* _tmp9_;
	GArray* _tmp10_;
	Layout* _tmp11_;
	GArray* _tmp12_;
	Layout* _tmp13_;
	GArray* _tmp14_;
	Layout* _tmp15_;
	GArray* _tmp16_;
	Layout* _tmp17_;
	GArray* _tmp18_;
	Layout* _tmp19_;
	GArray* _tmp20_;
	Layout* _tmp21_;
	self = (Layouts*) g_object_new (object_type, NULL);
	_tmp0_ = g_array_new (TRUE, TRUE, sizeof (Layout*));
	g_array_set_clear_func (_tmp0_, (GDestroyNotify) _vala_Layout_free_function_content_of);
	_g_array_unref0 (self->priv->_layouts);
	self->priv->_layouts = _tmp0_;
	_tmp1_ = layout_manual_new ();
	manual = _tmp1_;
	_tmp2_ = layout_vertical_new ();
	vertical = _tmp2_;
	_tmp3_ = layout_horizontal_new ();
	horizontal = _tmp3_;
	_tmp4_ = layout_left_new ();
	left = _tmp4_;
	_tmp5_ = layout_right_new ();
	right = _tmp5_;
	_tmp6_ = layout_up_new ();
	up = _tmp6_;
	_tmp7_ = layout_down_new ();
	down = _tmp7_;
	_tmp8_ = self->priv->_layouts;
	_tmp9_ = _g_object_ref0 ((Layout*) manual);
	g_array_append_val (_tmp8_, _tmp9_);
	_tmp10_ = self->priv->_layouts;
	_tmp11_ = _g_object_ref0 ((Layout*) vertical);
	g_array_append_val (_tmp10_, _tmp11_);
	_tmp12_ = self->priv->_layouts;
	_tmp13_ = _g_object_ref0 ((Layout*) horizontal);
	g_array_append_val (_tmp12_, _tmp13_);
	_tmp14_ = self->priv->_layouts;
	_tmp15_ = _g_object_ref0 ((Layout*) left);
	g_array_append_val (_tmp14_, _tmp15_);
	_tmp16_ = self->priv->_layouts;
	_tmp17_ = _g_object_ref0 ((Layout*) right);
	g_array_append_val (_tmp16_, _tmp17_);
	_tmp18_ = self->priv->_layouts;
	_tmp19_ = _g_object_ref0 ((Layout*) up);
	g_array_append_val (_tmp18_, _tmp19_);
	_tmp20_ = self->priv->_layouts;
	_tmp21_ = _g_object_ref0 ((Layout*) down);
	g_array_append_val (_tmp20_, _tmp21_);
	_g_object_unref0 (down);
	_g_object_unref0 (up);
	_g_object_unref0 (right);
	_g_object_unref0 (left);
	_g_object_unref0 (horizontal);
	_g_object_unref0 (vertical);
	_g_object_unref0 (manual);
	return self;
}

Layouts*
layouts_new (void)
{
	return layouts_construct (TYPE_LAYOUTS);
}

void
layouts_get_names (Layouts* self,
                   GArray** names)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (*names != NULL);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				GArray* _tmp2_;
				GArray* _tmp3_;
				Layout* _tmp4_;
				const gchar* _tmp5_;
				const gchar* _tmp6_;
				gchar* _tmp7_;
				if (!_tmp0_) {
					gint _tmp1_;
					_tmp1_ = i;
					i = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				_tmp2_ = self->priv->_layouts;
				if (!(((guint) i) < _tmp2_->len)) {
					break;
				}
				_tmp3_ = self->priv->_layouts;
				_tmp4_ = g_array_index (_tmp3_, Layout*, (guint) i);
				_tmp5_ = layout_get_name (_tmp4_);
				_tmp6_ = _tmp5_;
				_tmp7_ = g_strdup (_tmp6_);
				g_array_append_val (*names, _tmp7_);
			}
		}
	}
}

void
layouts_get_icons (Layouts* self,
                   GArray** light_icons,
                   GArray** dark_icons)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (*light_icons != NULL);
	g_return_if_fail (*dark_icons != NULL);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				GArray* _tmp2_;
				GArray* _tmp3_;
				Layout* _tmp4_;
				const gchar* _tmp5_;
				const gchar* _tmp6_;
				gchar* _tmp7_;
				GArray* _tmp8_;
				Layout* _tmp9_;
				const gchar* _tmp10_;
				const gchar* _tmp11_;
				gchar* _tmp12_;
				if (!_tmp0_) {
					gint _tmp1_;
					_tmp1_ = i;
					i = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				_tmp2_ = self->priv->_layouts;
				if (!(((guint) i) < _tmp2_->len)) {
					break;
				}
				_tmp3_ = self->priv->_layouts;
				_tmp4_ = g_array_index (_tmp3_, Layout*, (guint) i);
				_tmp5_ = layout_get_light_icon (_tmp4_);
				_tmp6_ = _tmp5_;
				_tmp7_ = g_strdup (_tmp6_);
				g_array_append_val (*light_icons, _tmp7_);
				_tmp8_ = self->priv->_layouts;
				_tmp9_ = g_array_index (_tmp8_, Layout*, (guint) i);
				_tmp10_ = layout_get_dark_icon (_tmp9_);
				_tmp11_ = _tmp10_;
				_tmp12_ = g_strdup (_tmp11_);
				g_array_append_val (*dark_icons, _tmp12_);
			}
		}
	}
}

Layout*
layouts_get_layout (Layouts* self,
                    const gchar* name)
{
	GArray* _tmp10_;
	Layout* _tmp11_;
	Layout* _tmp12_;
	Layout* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (name != NULL, NULL);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				GArray* _tmp2_;
				GArray* _tmp3_;
				Layout* _tmp4_;
				const gchar* _tmp5_;
				const gchar* _tmp6_;
				if (!_tmp0_) {
					gint _tmp1_;
					_tmp1_ = i;
					i = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				_tmp2_ = self->priv->_layouts;
				if (!(((guint) i) < _tmp2_->len)) {
					break;
				}
				_tmp3_ = self->priv->_layouts;
				_tmp4_ = g_array_index (_tmp3_, Layout*, (guint) i);
				_tmp5_ = layout_get_name (_tmp4_);
				_tmp6_ = _tmp5_;
				if (g_strcmp0 (name, _tmp6_) == 0) {
					GArray* _tmp7_;
					Layout* _tmp8_;
					Layout* _tmp9_;
					_tmp7_ = self->priv->_layouts;
					_tmp8_ = g_array_index (_tmp7_, Layout*, (guint) i);
					_tmp9_ = _g_object_ref0 (_tmp8_);
					result = _tmp9_;
					return result;
				}
			}
		}
	}
	_tmp10_ = self->priv->_layouts;
	_tmp11_ = g_array_index (_tmp10_, Layout*, (guint) 2);
	_tmp12_ = _g_object_ref0 (_tmp11_);
	result = _tmp12_;
	return result;
}

Layout*
layouts_get_default (Layouts* self)
{
	GArray* _tmp0_;
	Layout* _tmp1_;
	Layout* _tmp2_;
	Layout* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_layouts;
	_tmp1_ = g_array_index (_tmp0_, Layout*, (guint) 2);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	result = _tmp2_;
	return result;
}

static void
layouts_class_init (LayoutsClass * klass,
                    gpointer klass_data)
{
	layouts_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &Layouts_private_offset);
	G_OBJECT_CLASS (klass)->finalize = layouts_finalize;
}

static void
layouts_instance_init (Layouts * self,
                       gpointer klass)
{
	self->priv = layouts_get_instance_private (self);
}

static void
layouts_finalize (GObject * obj)
{
	Layouts * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_LAYOUTS, Layouts);
	_g_array_unref0 (self->priv->_layouts);
	G_OBJECT_CLASS (layouts_parent_class)->finalize (obj);
}

static GType
layouts_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (LayoutsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) layouts_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Layouts), 0, (GInstanceInitFunc) layouts_instance_init, NULL };
	GType layouts_type_id;
	layouts_type_id = g_type_register_static (G_TYPE_OBJECT, "Layouts", &g_define_type_info, 0);
	Layouts_private_offset = g_type_add_instance_private (layouts_type_id, sizeof (LayoutsPrivate));
	return layouts_type_id;
}

GType
layouts_get_type (void)
{
	static volatile gsize layouts_type_id__once = 0;
	if (g_once_init_enter (&layouts_type_id__once)) {
		GType layouts_type_id;
		layouts_type_id = layouts_get_type_once ();
		g_once_init_leave (&layouts_type_id__once, layouts_type_id);
	}
	return layouts_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;
}

