/* UndoStyleLinkWidth.c generated by valac 0.56.19, the Vala compiler
 * generated from UndoStyleLinkWidth.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_UNDO_ITEM (undo_item_get_type ())
#define UNDO_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_ITEM, UndoItem))
#define UNDO_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_ITEM, UndoItemClass))
#define IS_UNDO_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_ITEM))
#define IS_UNDO_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_ITEM))
#define UNDO_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_ITEM, UndoItemClass))

typedef struct _UndoItem UndoItem;
typedef struct _UndoItemClass UndoItemClass;
typedef struct _UndoItemPrivate UndoItemPrivate;

#define TYPE_MIND_MAP (mind_map_get_type ())
#define MIND_MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MIND_MAP, MindMap))
#define MIND_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MIND_MAP, MindMapClass))
#define IS_MIND_MAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MIND_MAP))
#define IS_MIND_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MIND_MAP))
#define MIND_MAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MIND_MAP, MindMapClass))

typedef struct _MindMap MindMap;
typedef struct _MindMapClass MindMapClass;

#define TYPE_UNDO_STYLE_CHANGE (undo_style_change_get_type ())
#define UNDO_STYLE_CHANGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_STYLE_CHANGE, UndoStyleChange))
#define UNDO_STYLE_CHANGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_STYLE_CHANGE, UndoStyleChangeClass))
#define IS_UNDO_STYLE_CHANGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_STYLE_CHANGE))
#define IS_UNDO_STYLE_CHANGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_STYLE_CHANGE))
#define UNDO_STYLE_CHANGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_STYLE_CHANGE, UndoStyleChangeClass))

typedef struct _UndoStyleChange UndoStyleChange;
typedef struct _UndoStyleChangeClass UndoStyleChangeClass;
typedef struct _UndoStyleChangePrivate UndoStyleChangePrivate;

#define TYPE_STYLE (style_get_type ())
#define STYLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_STYLE, Style))
#define STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_STYLE, StyleClass))
#define IS_STYLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_STYLE))
#define IS_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_STYLE))
#define STYLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_STYLE, StyleClass))

typedef struct _Style Style;
typedef struct _StyleClass StyleClass;

#define TYPE_UNDO_STYLE_LINK_WIDTH (undo_style_link_width_get_type ())
#define UNDO_STYLE_LINK_WIDTH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_STYLE_LINK_WIDTH, UndoStyleLinkWidth))
#define UNDO_STYLE_LINK_WIDTH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_STYLE_LINK_WIDTH, UndoStyleLinkWidthClass))
#define IS_UNDO_STYLE_LINK_WIDTH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_STYLE_LINK_WIDTH))
#define IS_UNDO_STYLE_LINK_WIDTH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_STYLE_LINK_WIDTH))
#define UNDO_STYLE_LINK_WIDTH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_STYLE_LINK_WIDTH, UndoStyleLinkWidthClass))

typedef struct _UndoStyleLinkWidth UndoStyleLinkWidth;
typedef struct _UndoStyleLinkWidthClass UndoStyleLinkWidthClass;
typedef struct _UndoStyleLinkWidthPrivate UndoStyleLinkWidthPrivate;
enum  {
	UNDO_STYLE_LINK_WIDTH_0_PROPERTY,
	UNDO_STYLE_LINK_WIDTH_NUM_PROPERTIES
};
static GParamSpec* undo_style_link_width_properties[UNDO_STYLE_LINK_WIDTH_NUM_PROPERTIES];
#define _g_ptr_array_unref0(var) ((var == NULL) ? NULL : (var = (g_ptr_array_unref (var), NULL)))
typedef enum  {
	STYLE_AFFECTS_ALL = 0,
	STYLE_AFFECTS_SELECTED_NODES,
	STYLE_AFFECTS_SELECTED_CONNECTIONS,
	STYLE_AFFECTS_SELECTED_CALLOUTS,
	STYLE_AFFECTS_NUM
} StyleAffects;

#define TYPE_STYLE_AFFECTS (style_affects_get_type ())
#define _g_free0(var) (var = (g_free (var), NULL))

struct _UndoItem {
	GObject parent_instance;
	UndoItemPrivate * priv;
};

struct _UndoItemClass {
	GObjectClass parent_class;
	void (*undo) (UndoItem* self, MindMap* map);
	void (*redo) (UndoItem* self, MindMap* map);
	gboolean (*matches) (UndoItem* self, UndoItem* item);
	void (*replace_with_item) (UndoItem* self, UndoItem* item);
	gchar* (*to_string) (UndoItem* self);
};

struct _UndoStyleChange {
	UndoItem parent_instance;
	UndoStyleChangePrivate * priv;
};

struct _UndoStyleChangeClass {
	UndoItemClass parent_class;
	void (*load_style_value) (UndoStyleChange* self, Style* style);
	void (*store_style_value) (UndoStyleChange* self, Style* style, gint index);
};

struct _UndoStyleLinkWidth {
	UndoStyleChange parent_instance;
	UndoStyleLinkWidthPrivate * priv;
};

struct _UndoStyleLinkWidthClass {
	UndoStyleChangeClass parent_class;
};

struct _UndoStyleLinkWidthPrivate {
	GPtrArray* _values;
};

static gint UndoStyleLinkWidth_private_offset;
static gpointer undo_style_link_width_parent_class = NULL;

VALA_EXTERN GType undo_item_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoItem, g_object_unref)
VALA_EXTERN gpointer mind_map_ref (gpointer instance);
VALA_EXTERN void mind_map_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_mind_map (const gchar* name,
                                 const gchar* nick,
                                 const gchar* blurb,
                                 GType object_type,
                                 GParamFlags flags);
VALA_EXTERN void value_set_mind_map (GValue* value,
                         gpointer v_object);
VALA_EXTERN void value_take_mind_map (GValue* value,
                          gpointer v_object);
VALA_EXTERN gpointer value_get_mind_map (const GValue* value);
VALA_EXTERN GType mind_map_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MindMap, mind_map_unref)
VALA_EXTERN GType undo_style_change_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoStyleChange, g_object_unref)
VALA_EXTERN gpointer style_ref (gpointer instance);
VALA_EXTERN void style_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_style (const gchar* name,
                              const gchar* nick,
                              const gchar* blurb,
                              GType object_type,
                              GParamFlags flags);
VALA_EXTERN void value_set_style (GValue* value,
                      gpointer v_object);
VALA_EXTERN void value_take_style (GValue* value,
                       gpointer v_object);
VALA_EXTERN gpointer value_get_style (const GValue* value);
VALA_EXTERN GType style_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Style, style_unref)
VALA_EXTERN GType undo_style_link_width_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoStyleLinkWidth, g_object_unref)
VALA_EXTERN void undo_style_change_load_style_value (UndoStyleChange* self,
                                         Style* style);
VALA_EXTERN void undo_style_change_store_style_value (UndoStyleChange* self,
                                          Style* style,
                                          gint index);
VALA_EXTERN void undo_item_replace_with_item (UndoItem* self,
                                  UndoItem* item);
VALA_EXTERN gchar* undo_item_to_string (UndoItem* self);
VALA_EXTERN GType style_affects_get_type (void) G_GNUC_CONST ;
VALA_EXTERN UndoStyleLinkWidth* undo_style_link_width_new (StyleAffects affects,
                                               gint link_width,
                                               MindMap* map);
VALA_EXTERN UndoStyleLinkWidth* undo_style_link_width_construct (GType object_type,
                                                     StyleAffects affects,
                                                     gint link_width,
                                                     MindMap* map);
VALA_EXTERN UndoStyleChange* undo_style_change_new (StyleAffects affects,
                                        MindMap* map);
VALA_EXTERN UndoStyleChange* undo_style_change_construct (GType object_type,
                                              StyleAffects affects,
                                              MindMap* map);
VALA_EXTERN void undo_style_change_load_styles (UndoStyleChange* self,
                                    MindMap* map);
static void undo_style_link_width_real_load_style_value (UndoStyleChange* base,
                                                  Style* style);
VALA_EXTERN gint* style_get_link_width (Style* self);
static void undo_style_link_width_real_store_style_value (UndoStyleChange* base,
                                                   Style* style,
                                                   gint index);
VALA_EXTERN void style_set_link_width (Style* self,
                           gint* value);
static void undo_style_link_width_real_replace_with_item (UndoItem* base,
                                                   UndoItem* item);
static gchar* undo_style_link_width_real_to_string (UndoItem* base);
static void undo_style_link_width_finalize (GObject * obj);
static GType undo_style_link_width_get_type_once (void);
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
undo_style_link_width_get_instance_private (UndoStyleLinkWidth* self)
{
	return G_STRUCT_MEMBER_P (self, UndoStyleLinkWidth_private_offset);
}

UndoStyleLinkWidth*
undo_style_link_width_construct (GType object_type,
                                 StyleAffects affects,
                                 gint link_width,
                                 MindMap* map)
{
	UndoStyleLinkWidth * self = NULL;
	GPtrArray* _tmp0_;
	GPtrArray* _tmp1_;
	g_return_val_if_fail (map != NULL, NULL);
	self = (UndoStyleLinkWidth*) undo_style_change_construct (object_type, affects, map);
	_tmp0_ = g_ptr_array_new_full ((guint) 0, NULL);
	_g_ptr_array_unref0 (self->priv->_values);
	self->priv->_values = _tmp0_;
	_tmp1_ = self->priv->_values;
	g_ptr_array_add (_tmp1_, (gpointer) ((gintptr) link_width));
	undo_style_change_load_styles ((UndoStyleChange*) self, map);
	return self;
}

UndoStyleLinkWidth*
undo_style_link_width_new (StyleAffects affects,
                           gint link_width,
                           MindMap* map)
{
	return undo_style_link_width_construct (TYPE_UNDO_STYLE_LINK_WIDTH, affects, link_width, map);
}

static void
undo_style_link_width_real_load_style_value (UndoStyleChange* base,
                                             Style* style)
{
	UndoStyleLinkWidth * self;
	GPtrArray* _tmp0_;
	gint* _tmp1_;
	gint* _tmp2_;
	self = (UndoStyleLinkWidth*) base;
	g_return_if_fail (style != NULL);
	_tmp0_ = self->priv->_values;
	_tmp1_ = style_get_link_width (style);
	_tmp2_ = _tmp1_;
	g_ptr_array_add (_tmp0_, (gpointer) ((gintptr) (*_tmp2_)));
}

static void
undo_style_link_width_real_store_style_value (UndoStyleChange* base,
                                              Style* style,
                                              gint index)
{
	UndoStyleLinkWidth * self;
	GPtrArray* _tmp0_;
	gconstpointer _tmp1_;
	gint _tmp2_;
	self = (UndoStyleLinkWidth*) base;
	g_return_if_fail (style != NULL);
	_tmp0_ = self->priv->_values;
	_tmp1_ = g_ptr_array_index (_tmp0_, (guint) index);
	_tmp2_ = (gint) ((gintptr) _tmp1_);
	style_set_link_width (style, &_tmp2_);
}

static void
g_ptr_array_set (GPtrArray* self,
                 guint index,
                 gpointer data)
{
	gpointer _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = data;
	data = NULL;
	g_ptr_array_add (self, _tmp0_);
	g_ptr_array_remove_index_fast (self, index);
}

static void
undo_style_link_width_real_replace_with_item (UndoItem* base,
                                              UndoItem* item)
{
	UndoStyleLinkWidth * self;
	GPtrArray* _tmp0_;
	GPtrArray* _tmp1_;
	gconstpointer _tmp2_;
	self = (UndoStyleLinkWidth*) base;
	g_return_if_fail (item != NULL);
	_tmp0_ = self->priv->_values;
	_tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (item, TYPE_UNDO_STYLE_LINK_WIDTH, UndoStyleLinkWidth)->priv->_values;
	_tmp2_ = g_ptr_array_index (_tmp1_, (guint) 0);
	g_ptr_array_set (_tmp0_, (guint) 0, (gpointer) ((gintptr) _tmp2_));
}

static gint
vala_g_ptr_array_get_length (GPtrArray* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = (gint) self->len;
	return result;
}

static gchar*
_vala_g_strjoinv (const gchar* separator,
                  gchar** str_array,
                  gint str_array_length1)
{
	gboolean _tmp0_ = FALSE;
	gchar* result;
	if (separator == NULL) {
		separator = "";
	}
	if (str_array != NULL) {
		gboolean _tmp1_ = FALSE;
		if (str_array_length1 > 0) {
			_tmp1_ = TRUE;
		} else {
			gboolean _tmp2_ = FALSE;
			if (str_array_length1 == -1) {
				const gchar* _tmp3_;
				_tmp3_ = str_array[0];
				_tmp2_ = _tmp3_ != NULL;
			} else {
				_tmp2_ = FALSE;
			}
			_tmp1_ = _tmp2_;
		}
		_tmp0_ = _tmp1_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gint i = 0;
		gsize len = 0UL;
		gint _tmp16_;
		gint _tmp17_;
		const gchar* res = NULL;
		void* _tmp18_;
		const gchar* _tmp19_ = NULL;
		const gchar* _tmp20_;
		void* ptr = NULL;
		const gchar* _tmp22_;
		void* _tmp23_;
		const gchar* _tmp33_;
		len = (gsize) 1;
		{
			gboolean _tmp4_ = FALSE;
			i = 0;
			_tmp4_ = TRUE;
			while (TRUE) {
				gboolean _tmp6_ = FALSE;
				gboolean _tmp7_ = FALSE;
				gint _tmp10_ = 0;
				const gchar* _tmp11_;
				if (!_tmp4_) {
					gint _tmp5_;
					_tmp5_ = i;
					i = _tmp5_ + 1;
				}
				_tmp4_ = FALSE;
				if (str_array_length1 != -1) {
					_tmp7_ = i < str_array_length1;
				} else {
					_tmp7_ = FALSE;
				}
				if (_tmp7_) {
					_tmp6_ = TRUE;
				} else {
					gboolean _tmp8_ = FALSE;
					if (str_array_length1 == -1) {
						const gchar* _tmp9_;
						_tmp9_ = str_array[i];
						_tmp8_ = _tmp9_ != NULL;
					} else {
						_tmp8_ = FALSE;
					}
					_tmp6_ = _tmp8_;
				}
				if (!_tmp6_) {
					break;
				}
				_tmp11_ = str_array[i];
				if (_tmp11_ != NULL) {
					const gchar* _tmp12_;
					gint _tmp13_;
					gint _tmp14_;
					_tmp12_ = str_array[i];
					_tmp13_ = strlen ((const gchar*) _tmp12_);
					_tmp14_ = _tmp13_;
					_tmp10_ = _tmp14_;
				} else {
					_tmp10_ = 0;
				}
				len += (gsize) _tmp10_;
			}
		}
		if (i == 0) {
			gchar* _tmp15_;
			_tmp15_ = g_strdup ("");
			result = _tmp15_;
			return result;
		}
		str_array_length1 = i;
		_tmp16_ = strlen ((const gchar*) separator);
		_tmp17_ = _tmp16_;
		len += (gsize) (_tmp17_ * (i - 1));
		_tmp18_ = g_malloc (len);
		res = _tmp18_;
		_tmp20_ = str_array[0];
		if (_tmp20_ != NULL) {
			const gchar* _tmp21_;
			_tmp21_ = str_array[0];
			_tmp19_ = (const gchar*) _tmp21_;
		} else {
			_tmp19_ = "";
		}
		_tmp22_ = res;
		_tmp23_ = g_stpcpy ((void*) _tmp22_, _tmp19_);
		ptr = _tmp23_;
		{
			gboolean _tmp24_ = FALSE;
			i = 1;
			_tmp24_ = TRUE;
			while (TRUE) {
				void* _tmp26_;
				void* _tmp27_;
				const gchar* _tmp28_ = NULL;
				const gchar* _tmp29_;
				void* _tmp31_;
				void* _tmp32_;
				if (!_tmp24_) {
					gint _tmp25_;
					_tmp25_ = i;
					i = _tmp25_ + 1;
				}
				_tmp24_ = FALSE;
				if (!(i < str_array_length1)) {
					break;
				}
				_tmp26_ = ptr;
				_tmp27_ = g_stpcpy (_tmp26_, (const gchar*) separator);
				ptr = _tmp27_;
				_tmp29_ = str_array[i];
				if (_tmp29_ != NULL) {
					const gchar* _tmp30_;
					_tmp30_ = str_array[i];
					_tmp28_ = (const gchar*) _tmp30_;
				} else {
					_tmp28_ = "";
				}
				_tmp31_ = ptr;
				_tmp32_ = g_stpcpy (_tmp31_, _tmp28_);
				ptr = _tmp32_;
			}
		}
		_tmp33_ = res;
		res = NULL;
		result = (gchar*) _tmp33_;
		return result;
	} else {
		gchar* _tmp34_;
		_tmp34_ = g_strdup ("");
		result = _tmp34_;
		return result;
	}
}

static gchar*
undo_style_link_width_real_to_string (UndoItem* base)
{
	UndoStyleLinkWidth * self;
	gchar** sa = NULL;
	GPtrArray* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	gchar** _tmp3_;
	gint sa_length1;
	gint _sa_size_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	gchar** _tmp15_;
	gint _tmp15__length1;
	gchar* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	gchar* result;
	self = (UndoStyleLinkWidth*) base;
	_tmp0_ = self->priv->_values;
	_tmp1_ = vala_g_ptr_array_get_length (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_new0 (gchar*, _tmp2_ + 1);
	sa = _tmp3_;
	sa_length1 = _tmp2_;
	_sa_size_ = sa_length1;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp4_ = FALSE;
			_tmp4_ = TRUE;
			while (TRUE) {
				GPtrArray* _tmp6_;
				gint _tmp7_;
				gint _tmp8_;
				gchar** _tmp9_;
				gint _tmp9__length1;
				GPtrArray* _tmp10_;
				gconstpointer _tmp11_;
				gchar* _tmp12_;
				if (!_tmp4_) {
					gint _tmp5_;
					_tmp5_ = i;
					i = _tmp5_ + 1;
				}
				_tmp4_ = FALSE;
				_tmp6_ = self->priv->_values;
				_tmp7_ = vala_g_ptr_array_get_length (_tmp6_);
				_tmp8_ = _tmp7_;
				if (!(i < _tmp8_)) {
					break;
				}
				_tmp9_ = sa;
				_tmp9__length1 = sa_length1;
				_tmp10_ = self->priv->_values;
				_tmp11_ = g_ptr_array_index (_tmp10_, (guint) i);
				_tmp12_ = g_strdup_printf ("%i", (gint) ((gintptr) _tmp11_));
				_g_free0 (_tmp9_[i]);
				_tmp9_[i] = _tmp12_;
			}
		}
	}
	_tmp13_ = UNDO_ITEM_CLASS (undo_style_link_width_parent_class)->to_string ((UndoItem*) G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_UNDO_STYLE_CHANGE, UndoStyleChange));
	_tmp14_ = _tmp13_;
	_tmp15_ = sa;
	_tmp15__length1 = sa_length1;
	_tmp16_ = _vala_g_strjoinv (",", _tmp15_, (gint) _tmp15__length1);
	_tmp17_ = _tmp16_;
	_tmp18_ = g_strdup_printf (", lwidth: %s", _tmp17_);
	_tmp19_ = _tmp18_;
	_tmp20_ = g_strconcat (_tmp14_, _tmp19_, NULL);
	_tmp21_ = _tmp20_;
	_g_free0 (_tmp19_);
	_g_free0 (_tmp17_);
	_g_free0 (_tmp14_);
	result = _tmp21_;
	sa = (_vala_array_free (sa, sa_length1, (GDestroyNotify) g_free), NULL);
	return result;
}

static void
undo_style_link_width_class_init (UndoStyleLinkWidthClass * klass,
                                  gpointer klass_data)
{
	undo_style_link_width_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &UndoStyleLinkWidth_private_offset);
	((UndoStyleChangeClass *) klass)->load_style_value = (void (*) (UndoStyleChange*, Style*)) undo_style_link_width_real_load_style_value;
	((UndoStyleChangeClass *) klass)->store_style_value = (void (*) (UndoStyleChange*, Style*, gint)) undo_style_link_width_real_store_style_value;
	((UndoItemClass *) klass)->replace_with_item = (void (*) (UndoItem*, UndoItem*)) undo_style_link_width_real_replace_with_item;
	((UndoItemClass *) klass)->to_string = (gchar* (*) (UndoItem*)) undo_style_link_width_real_to_string;
	G_OBJECT_CLASS (klass)->finalize = undo_style_link_width_finalize;
}

static void
undo_style_link_width_instance_init (UndoStyleLinkWidth * self,
                                     gpointer klass)
{
	self->priv = undo_style_link_width_get_instance_private (self);
}

static void
undo_style_link_width_finalize (GObject * obj)
{
	UndoStyleLinkWidth * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_UNDO_STYLE_LINK_WIDTH, UndoStyleLinkWidth);
	_g_ptr_array_unref0 (self->priv->_values);
	G_OBJECT_CLASS (undo_style_link_width_parent_class)->finalize (obj);
}

static GType
undo_style_link_width_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (UndoStyleLinkWidthClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) undo_style_link_width_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UndoStyleLinkWidth), 0, (GInstanceInitFunc) undo_style_link_width_instance_init, NULL };
	GType undo_style_link_width_type_id;
	undo_style_link_width_type_id = g_type_register_static (TYPE_UNDO_STYLE_CHANGE, "UndoStyleLinkWidth", &g_define_type_info, 0);
	UndoStyleLinkWidth_private_offset = g_type_add_instance_private (undo_style_link_width_type_id, sizeof (UndoStyleLinkWidthPrivate));
	return undo_style_link_width_type_id;
}

GType
undo_style_link_width_get_type (void)
{
	static volatile gsize undo_style_link_width_type_id__once = 0;
	if (g_once_init_enter (&undo_style_link_width_type_id__once)) {
		GType undo_style_link_width_type_id;
		undo_style_link_width_type_id = undo_style_link_width_get_type_once ();
		g_once_init_leave (&undo_style_link_width_type_id__once, undo_style_link_width_type_id);
	}
	return undo_style_link_width_type_id__once;
}

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

