/* key-editor-child.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from key-editor-child.vala, do not modify */

/*
  This file is part of Dconf Editor

  Dconf Editor 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
  (at your option) any later version.

  Dconf Editor 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 Dconf Editor.  If not, see <https://www.gnu.org/licenses/>.
*/

#include <glib-object.h>
#include <gtk/gtk.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>
#include <gio/gio.h>
#include <float.h>
#include <math.h>
#include <gdk/gdk.h>

#define KEY_EDITOR_CHILD_out_of_range_text _ ("Given value is out of range.")
#define KEY_EDITOR_CHILD_invalid_value_text _ ("This value is invalid for the key type.")
#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_KEY_EDITOR_CHILD (key_editor_child_get_type ())
#define KEY_EDITOR_CHILD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_KEY_EDITOR_CHILD, KeyEditorChild))
#define IS_KEY_EDITOR_CHILD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_KEY_EDITOR_CHILD))
#define KEY_EDITOR_CHILD_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_KEY_EDITOR_CHILD, KeyEditorChildIface))

typedef struct _KeyEditorChild KeyEditorChild;
typedef struct _KeyEditorChildIface KeyEditorChildIface;
enum  {
	KEY_EDITOR_CHILD_VALUE_HAS_CHANGED_SIGNAL,
	KEY_EDITOR_CHILD_CHILD_ACTIVATED_SIGNAL,
	KEY_EDITOR_CHILD_NUM_SIGNALS
};
static guint key_editor_child_signals[KEY_EDITOR_CHILD_NUM_SIGNALS] = {0};

#define TYPE_KEY_EDITOR_CHILD_SINGLE (key_editor_child_single_get_type ())
#define KEY_EDITOR_CHILD_SINGLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_KEY_EDITOR_CHILD_SINGLE, KeyEditorChildSingle))
#define KEY_EDITOR_CHILD_SINGLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_KEY_EDITOR_CHILD_SINGLE, KeyEditorChildSingleClass))
#define IS_KEY_EDITOR_CHILD_SINGLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_KEY_EDITOR_CHILD_SINGLE))
#define IS_KEY_EDITOR_CHILD_SINGLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_KEY_EDITOR_CHILD_SINGLE))
#define KEY_EDITOR_CHILD_SINGLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_KEY_EDITOR_CHILD_SINGLE, KeyEditorChildSingleClass))

typedef struct _KeyEditorChildSingle KeyEditorChildSingle;
typedef struct _KeyEditorChildSingleClass KeyEditorChildSingleClass;
typedef struct _KeyEditorChildSinglePrivate KeyEditorChildSinglePrivate;
enum  {
	KEY_EDITOR_CHILD_SINGLE_0_PROPERTY,
	KEY_EDITOR_CHILD_SINGLE_NUM_PROPERTIES
};
static GParamSpec* key_editor_child_single_properties[KEY_EDITOR_CHILD_SINGLE_NUM_PROPERTIES];
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))

#define TYPE_KEY_EDITOR_CHILD_ENUM (key_editor_child_enum_get_type ())
#define KEY_EDITOR_CHILD_ENUM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_KEY_EDITOR_CHILD_ENUM, KeyEditorChildEnum))
#define KEY_EDITOR_CHILD_ENUM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_KEY_EDITOR_CHILD_ENUM, KeyEditorChildEnumClass))
#define IS_KEY_EDITOR_CHILD_ENUM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_KEY_EDITOR_CHILD_ENUM))
#define IS_KEY_EDITOR_CHILD_ENUM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_KEY_EDITOR_CHILD_ENUM))
#define KEY_EDITOR_CHILD_ENUM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_KEY_EDITOR_CHILD_ENUM, KeyEditorChildEnumClass))

typedef struct _KeyEditorChildEnum KeyEditorChildEnum;
typedef struct _KeyEditorChildEnumClass KeyEditorChildEnumClass;
typedef struct _KeyEditorChildEnumPrivate KeyEditorChildEnumPrivate;
enum  {
	KEY_EDITOR_CHILD_ENUM_0_PROPERTY,
	KEY_EDITOR_CHILD_ENUM_NUM_PROPERTIES
};
static GParamSpec* key_editor_child_enum_properties[KEY_EDITOR_CHILD_ENUM_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define TYPE_CONTEXT_POPOVER (context_popover_get_type ())
#define CONTEXT_POPOVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONTEXT_POPOVER, ContextPopover))
#define CONTEXT_POPOVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONTEXT_POPOVER, ContextPopoverClass))
#define IS_CONTEXT_POPOVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONTEXT_POPOVER))
#define IS_CONTEXT_POPOVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONTEXT_POPOVER))
#define CONTEXT_POPOVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONTEXT_POPOVER, ContextPopoverClass))

typedef struct _ContextPopover ContextPopover;
typedef struct _ContextPopoverClass ContextPopoverClass;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_variant_type_free0(var) ((var == NULL) ? NULL : (var = (g_variant_type_free (var), NULL)))

#define TYPE_KEY_EDITOR_CHILD_FLAGS (key_editor_child_flags_get_type ())
#define KEY_EDITOR_CHILD_FLAGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_KEY_EDITOR_CHILD_FLAGS, KeyEditorChildFlags))
#define KEY_EDITOR_CHILD_FLAGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_KEY_EDITOR_CHILD_FLAGS, KeyEditorChildFlagsClass))
#define IS_KEY_EDITOR_CHILD_FLAGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_KEY_EDITOR_CHILD_FLAGS))
#define IS_KEY_EDITOR_CHILD_FLAGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_KEY_EDITOR_CHILD_FLAGS))
#define KEY_EDITOR_CHILD_FLAGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_KEY_EDITOR_CHILD_FLAGS, KeyEditorChildFlagsClass))

typedef struct _KeyEditorChildFlags KeyEditorChildFlags;
typedef struct _KeyEditorChildFlagsClass KeyEditorChildFlagsClass;
typedef struct _KeyEditorChildFlagsPrivate KeyEditorChildFlagsPrivate;
enum  {
	KEY_EDITOR_CHILD_FLAGS_0_PROPERTY,
	KEY_EDITOR_CHILD_FLAGS_NUM_PROPERTIES
};
static GParamSpec* key_editor_child_flags_properties[KEY_EDITOR_CHILD_FLAGS_NUM_PROPERTIES];

#define TYPE_KEY_EDITOR_CHILD_NULLABLE_BOOL (key_editor_child_nullable_bool_get_type ())
#define KEY_EDITOR_CHILD_NULLABLE_BOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_KEY_EDITOR_CHILD_NULLABLE_BOOL, KeyEditorChildNullableBool))
#define KEY_EDITOR_CHILD_NULLABLE_BOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_KEY_EDITOR_CHILD_NULLABLE_BOOL, KeyEditorChildNullableBoolClass))
#define IS_KEY_EDITOR_CHILD_NULLABLE_BOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_KEY_EDITOR_CHILD_NULLABLE_BOOL))
#define IS_KEY_EDITOR_CHILD_NULLABLE_BOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_KEY_EDITOR_CHILD_NULLABLE_BOOL))
#define KEY_EDITOR_CHILD_NULLABLE_BOOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_KEY_EDITOR_CHILD_NULLABLE_BOOL, KeyEditorChildNullableBoolClass))

typedef struct _KeyEditorChildNullableBool KeyEditorChildNullableBool;
typedef struct _KeyEditorChildNullableBoolClass KeyEditorChildNullableBoolClass;
typedef struct _KeyEditorChildNullableBoolPrivate KeyEditorChildNullableBoolPrivate;
enum  {
	KEY_EDITOR_CHILD_NULLABLE_BOOL_0_PROPERTY,
	KEY_EDITOR_CHILD_NULLABLE_BOOL_NUM_PROPERTIES
};
static GParamSpec* key_editor_child_nullable_bool_properties[KEY_EDITOR_CHILD_NULLABLE_BOOL_NUM_PROPERTIES];

#define TYPE_KEY_EDITOR_CHILD_BOOL (key_editor_child_bool_get_type ())
#define KEY_EDITOR_CHILD_BOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_KEY_EDITOR_CHILD_BOOL, KeyEditorChildBool))
#define KEY_EDITOR_CHILD_BOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_KEY_EDITOR_CHILD_BOOL, KeyEditorChildBoolClass))
#define IS_KEY_EDITOR_CHILD_BOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_KEY_EDITOR_CHILD_BOOL))
#define IS_KEY_EDITOR_CHILD_BOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_KEY_EDITOR_CHILD_BOOL))
#define KEY_EDITOR_CHILD_BOOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_KEY_EDITOR_CHILD_BOOL, KeyEditorChildBoolClass))

typedef struct _KeyEditorChildBool KeyEditorChildBool;
typedef struct _KeyEditorChildBoolClass KeyEditorChildBoolClass;
typedef struct _KeyEditorChildBoolPrivate KeyEditorChildBoolPrivate;
enum  {
	KEY_EDITOR_CHILD_BOOL_0_PROPERTY,
	KEY_EDITOR_CHILD_BOOL_NUM_PROPERTIES
};
static GParamSpec* key_editor_child_bool_properties[KEY_EDITOR_CHILD_BOOL_NUM_PROPERTIES];

#define TYPE_KEY_EDITOR_CHILD_NUMBER_CUSTOM (key_editor_child_number_custom_get_type ())
#define KEY_EDITOR_CHILD_NUMBER_CUSTOM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_KEY_EDITOR_CHILD_NUMBER_CUSTOM, KeyEditorChildNumberCustom))
#define KEY_EDITOR_CHILD_NUMBER_CUSTOM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_KEY_EDITOR_CHILD_NUMBER_CUSTOM, KeyEditorChildNumberCustomClass))
#define IS_KEY_EDITOR_CHILD_NUMBER_CUSTOM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_KEY_EDITOR_CHILD_NUMBER_CUSTOM))
#define IS_KEY_EDITOR_CHILD_NUMBER_CUSTOM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_KEY_EDITOR_CHILD_NUMBER_CUSTOM))
#define KEY_EDITOR_CHILD_NUMBER_CUSTOM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_KEY_EDITOR_CHILD_NUMBER_CUSTOM, KeyEditorChildNumberCustomClass))

typedef struct _KeyEditorChildNumberCustom KeyEditorChildNumberCustom;
typedef struct _KeyEditorChildNumberCustomClass KeyEditorChildNumberCustomClass;
typedef struct _KeyEditorChildNumberCustomPrivate KeyEditorChildNumberCustomPrivate;
enum  {
	KEY_EDITOR_CHILD_NUMBER_CUSTOM_0_PROPERTY,
	KEY_EDITOR_CHILD_NUMBER_CUSTOM_NUM_PROPERTIES
};
static GParamSpec* key_editor_child_number_custom_properties[KEY_EDITOR_CHILD_NUMBER_CUSTOM_NUM_PROPERTIES];
typedef struct _Block10Data Block10Data;

#define TYPE_KEY_EDITOR_CHILD_NUMBER_DOUBLE (key_editor_child_number_double_get_type ())
#define KEY_EDITOR_CHILD_NUMBER_DOUBLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_KEY_EDITOR_CHILD_NUMBER_DOUBLE, KeyEditorChildNumberDouble))
#define KEY_EDITOR_CHILD_NUMBER_DOUBLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_KEY_EDITOR_CHILD_NUMBER_DOUBLE, KeyEditorChildNumberDoubleClass))
#define IS_KEY_EDITOR_CHILD_NUMBER_DOUBLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_KEY_EDITOR_CHILD_NUMBER_DOUBLE))
#define IS_KEY_EDITOR_CHILD_NUMBER_DOUBLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_KEY_EDITOR_CHILD_NUMBER_DOUBLE))
#define KEY_EDITOR_CHILD_NUMBER_DOUBLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_KEY_EDITOR_CHILD_NUMBER_DOUBLE, KeyEditorChildNumberDoubleClass))

typedef struct _KeyEditorChildNumberDouble KeyEditorChildNumberDouble;
typedef struct _KeyEditorChildNumberDoubleClass KeyEditorChildNumberDoubleClass;
typedef struct _KeyEditorChildNumberDoublePrivate KeyEditorChildNumberDoublePrivate;
enum  {
	KEY_EDITOR_CHILD_NUMBER_DOUBLE_0_PROPERTY,
	KEY_EDITOR_CHILD_NUMBER_DOUBLE_NUM_PROPERTIES
};
static GParamSpec* key_editor_child_number_double_properties[KEY_EDITOR_CHILD_NUMBER_DOUBLE_NUM_PROPERTIES];

#define TYPE_KEY_EDITOR_CHILD_NUMBER_INT64 (key_editor_child_number_int64_get_type ())
#define KEY_EDITOR_CHILD_NUMBER_INT64(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_KEY_EDITOR_CHILD_NUMBER_INT64, KeyEditorChildNumberInt64))
#define KEY_EDITOR_CHILD_NUMBER_INT64_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_KEY_EDITOR_CHILD_NUMBER_INT64, KeyEditorChildNumberInt64Class))
#define IS_KEY_EDITOR_CHILD_NUMBER_INT64(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_KEY_EDITOR_CHILD_NUMBER_INT64))
#define IS_KEY_EDITOR_CHILD_NUMBER_INT64_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_KEY_EDITOR_CHILD_NUMBER_INT64))
#define KEY_EDITOR_CHILD_NUMBER_INT64_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_KEY_EDITOR_CHILD_NUMBER_INT64, KeyEditorChildNumberInt64Class))

typedef struct _KeyEditorChildNumberInt64 KeyEditorChildNumberInt64;
typedef struct _KeyEditorChildNumberInt64Class KeyEditorChildNumberInt64Class;
typedef struct _KeyEditorChildNumberInt64Private KeyEditorChildNumberInt64Private;
enum  {
	KEY_EDITOR_CHILD_NUMBER_INT64_0_PROPERTY,
	KEY_EDITOR_CHILD_NUMBER_INT64_NUM_PROPERTIES
};
static GParamSpec* key_editor_child_number_int64_properties[KEY_EDITOR_CHILD_NUMBER_INT64_NUM_PROPERTIES];

#define TYPE_KEY_EDITOR_CHILD_NUMBER_UINT64 (key_editor_child_number_uint64_get_type ())
#define KEY_EDITOR_CHILD_NUMBER_UINT64(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_KEY_EDITOR_CHILD_NUMBER_UINT64, KeyEditorChildNumberUint64))
#define KEY_EDITOR_CHILD_NUMBER_UINT64_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_KEY_EDITOR_CHILD_NUMBER_UINT64, KeyEditorChildNumberUint64Class))
#define IS_KEY_EDITOR_CHILD_NUMBER_UINT64(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_KEY_EDITOR_CHILD_NUMBER_UINT64))
#define IS_KEY_EDITOR_CHILD_NUMBER_UINT64_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_KEY_EDITOR_CHILD_NUMBER_UINT64))
#define KEY_EDITOR_CHILD_NUMBER_UINT64_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_KEY_EDITOR_CHILD_NUMBER_UINT64, KeyEditorChildNumberUint64Class))

typedef struct _KeyEditorChildNumberUint64 KeyEditorChildNumberUint64;
typedef struct _KeyEditorChildNumberUint64Class KeyEditorChildNumberUint64Class;
typedef struct _KeyEditorChildNumberUint64Private KeyEditorChildNumberUint64Private;
enum  {
	KEY_EDITOR_CHILD_NUMBER_UINT64_0_PROPERTY,
	KEY_EDITOR_CHILD_NUMBER_UINT64_NUM_PROPERTIES
};
static GParamSpec* key_editor_child_number_uint64_properties[KEY_EDITOR_CHILD_NUMBER_UINT64_NUM_PROPERTIES];

#define TYPE_KEY_EDITOR_CHILD_NUMBER_INT (key_editor_child_number_int_get_type ())
#define KEY_EDITOR_CHILD_NUMBER_INT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_KEY_EDITOR_CHILD_NUMBER_INT, KeyEditorChildNumberInt))
#define KEY_EDITOR_CHILD_NUMBER_INT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_KEY_EDITOR_CHILD_NUMBER_INT, KeyEditorChildNumberIntClass))
#define IS_KEY_EDITOR_CHILD_NUMBER_INT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_KEY_EDITOR_CHILD_NUMBER_INT))
#define IS_KEY_EDITOR_CHILD_NUMBER_INT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_KEY_EDITOR_CHILD_NUMBER_INT))
#define KEY_EDITOR_CHILD_NUMBER_INT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_KEY_EDITOR_CHILD_NUMBER_INT, KeyEditorChildNumberIntClass))

typedef struct _KeyEditorChildNumberInt KeyEditorChildNumberInt;
typedef struct _KeyEditorChildNumberIntClass KeyEditorChildNumberIntClass;
typedef struct _KeyEditorChildNumberIntPrivate KeyEditorChildNumberIntPrivate;
enum  {
	KEY_EDITOR_CHILD_NUMBER_INT_0_PROPERTY,
	KEY_EDITOR_CHILD_NUMBER_INT_NUM_PROPERTIES
};
static GParamSpec* key_editor_child_number_int_properties[KEY_EDITOR_CHILD_NUMBER_INT_NUM_PROPERTIES];
typedef struct _Block11Data Block11Data;

#define TYPE_KEY_EDITOR_CHILD_ARRAY (key_editor_child_array_get_type ())
#define KEY_EDITOR_CHILD_ARRAY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_KEY_EDITOR_CHILD_ARRAY, KeyEditorChildArray))
#define KEY_EDITOR_CHILD_ARRAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_KEY_EDITOR_CHILD_ARRAY, KeyEditorChildArrayClass))
#define IS_KEY_EDITOR_CHILD_ARRAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_KEY_EDITOR_CHILD_ARRAY))
#define IS_KEY_EDITOR_CHILD_ARRAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_KEY_EDITOR_CHILD_ARRAY))
#define KEY_EDITOR_CHILD_ARRAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_KEY_EDITOR_CHILD_ARRAY, KeyEditorChildArrayClass))

typedef struct _KeyEditorChildArray KeyEditorChildArray;
typedef struct _KeyEditorChildArrayClass KeyEditorChildArrayClass;
typedef struct _KeyEditorChildArrayPrivate KeyEditorChildArrayPrivate;
enum  {
	KEY_EDITOR_CHILD_ARRAY_0_PROPERTY,
	KEY_EDITOR_CHILD_ARRAY_NUM_PROPERTIES
};
static GParamSpec* key_editor_child_array_properties[KEY_EDITOR_CHILD_ARRAY_NUM_PROPERTIES];
typedef struct _Block12Data Block12Data;

#define TYPE_KEY_EDITOR_CHILD_DEFAULT (key_editor_child_default_get_type ())
#define KEY_EDITOR_CHILD_DEFAULT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_KEY_EDITOR_CHILD_DEFAULT, KeyEditorChildDefault))
#define KEY_EDITOR_CHILD_DEFAULT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_KEY_EDITOR_CHILD_DEFAULT, KeyEditorChildDefaultClass))
#define IS_KEY_EDITOR_CHILD_DEFAULT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_KEY_EDITOR_CHILD_DEFAULT))
#define IS_KEY_EDITOR_CHILD_DEFAULT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_KEY_EDITOR_CHILD_DEFAULT))
#define KEY_EDITOR_CHILD_DEFAULT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_KEY_EDITOR_CHILD_DEFAULT, KeyEditorChildDefaultClass))

typedef struct _KeyEditorChildDefault KeyEditorChildDefault;
typedef struct _KeyEditorChildDefaultClass KeyEditorChildDefaultClass;
typedef struct _KeyEditorChildDefaultPrivate KeyEditorChildDefaultPrivate;
enum  {
	KEY_EDITOR_CHILD_DEFAULT_0_PROPERTY,
	KEY_EDITOR_CHILD_DEFAULT_NUM_PROPERTIES
};
static GParamSpec* key_editor_child_default_properties[KEY_EDITOR_CHILD_DEFAULT_NUM_PROPERTIES];
typedef struct _Block13Data Block13Data;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _KeyEditorChildIface {
	GTypeInterface parent_iface;
	GVariant* (*get_variant) (KeyEditorChild* self);
	void (*reload) (KeyEditorChild* self, GVariant* gvariant);
};

struct _KeyEditorChildSingle {
	GtkLabel parent_instance;
	KeyEditorChildSinglePrivate * priv;
};

struct _KeyEditorChildSingleClass {
	GtkLabelClass parent_class;
};

struct _KeyEditorChildSinglePrivate {
	GVariant* variant;
};

struct _KeyEditorChildEnum {
	GtkMenuButton parent_instance;
	KeyEditorChildEnumPrivate * priv;
};

struct _KeyEditorChildEnumClass {
	GtkMenuButtonClass parent_class;
};

struct _KeyEditorChildEnumPrivate {
	GVariant* variant;
	GAction* action;
};

struct _KeyEditorChildFlags {
	GtkGrid parent_instance;
	KeyEditorChildFlagsPrivate * priv;
};

struct _KeyEditorChildFlagsClass {
	GtkGridClass parent_class;
};

struct _KeyEditorChildFlagsPrivate {
	gchar** all_flags;
	gint all_flags_length1;
	gint _all_flags_size_;
	ContextPopover* popover;
	GVariant* variant;
	GtkLabel* label;
};

struct _KeyEditorChildNullableBool {
	GtkMenuButton parent_instance;
	KeyEditorChildNullableBoolPrivate * priv;
};

struct _KeyEditorChildNullableBoolClass {
	GtkMenuButtonClass parent_class;
};

struct _KeyEditorChildNullableBoolPrivate {
	GVariant* variant;
	GVariant* maybe_variant;
	GAction* action;
};

struct _KeyEditorChildBool {
	GtkBox parent_instance;
	KeyEditorChildBoolPrivate * priv;
};

struct _KeyEditorChildBoolClass {
	GtkBoxClass parent_class;
};

struct _KeyEditorChildBoolPrivate {
	GtkToggleButton* button_true;
};

struct _KeyEditorChildNumberCustom {
	GtkEntry parent_instance;
	KeyEditorChildNumberCustomPrivate * priv;
	GVariant* variant;
	gulong deleted_text_handler;
	gulong inserted_text_handler;
};

struct _KeyEditorChildNumberCustomClass {
	GtkEntryClass parent_class;
	gboolean (*test_value) (KeyEditorChildNumberCustom* self);
};

struct _KeyEditorChildNumberCustomPrivate {
	gboolean value_has_error;
};

struct _Block10Data {
	int _ref_count_;
	KeyEditorChildNumberCustom* self;
	GtkEntryBuffer* ref_buffer;
	gulong entry_activated_handler;
	gulong entry_sensitive_handler;
};

struct _KeyEditorChildNumberDouble {
	KeyEditorChildNumberCustom parent_instance;
	KeyEditorChildNumberDoublePrivate * priv;
};

struct _KeyEditorChildNumberDoubleClass {
	KeyEditorChildNumberCustomClass parent_class;
};

struct _KeyEditorChildNumberDoublePrivate {
	gdouble min;
	gdouble max;
};

struct _KeyEditorChildNumberInt64 {
	KeyEditorChildNumberCustom parent_instance;
	KeyEditorChildNumberInt64Private * priv;
};

struct _KeyEditorChildNumberInt64Class {
	KeyEditorChildNumberCustomClass parent_class;
};

struct _KeyEditorChildNumberInt64Private {
	gint64 min;
	gint64 max;
};

struct _KeyEditorChildNumberUint64 {
	KeyEditorChildNumberCustom parent_instance;
	KeyEditorChildNumberUint64Private * priv;
};

struct _KeyEditorChildNumberUint64Class {
	KeyEditorChildNumberCustomClass parent_class;
};

struct _KeyEditorChildNumberUint64Private {
	guint64 min;
	guint64 max;
};

struct _KeyEditorChildNumberInt {
	GtkSpinButton parent_instance;
	KeyEditorChildNumberIntPrivate * priv;
};

struct _KeyEditorChildNumberIntClass {
	GtkSpinButtonClass parent_class;
};

struct _KeyEditorChildNumberIntPrivate {
	GVariant* variant;
	gchar* key_type;
	gint64 min_int64;
	gint64 max_int64;
	gulong deleted_text_handler;
	gulong inserted_text_handler;
	gboolean value_has_error;
};

struct _Block11Data {
	int _ref_count_;
	KeyEditorChildNumberInt* self;
	GtkEntryBuffer* ref_buffer;
	gulong entry_activated_handler;
	gulong entry_sensitive_handler;
};

struct _KeyEditorChildArray {
	GtkGrid parent_instance;
	KeyEditorChildArrayPrivate * priv;
};

struct _KeyEditorChildArrayClass {
	GtkGridClass parent_class;
};

struct _KeyEditorChildArrayPrivate {
	GtkTextView* text_view;
	GtkRevealer* error_revealer;
	gchar* key_type;
	GVariant* variant;
	gulong deleted_text_handler;
	gulong inserted_text_handler;
};

struct _Block12Data {
	int _ref_count_;
	KeyEditorChildArray* self;
	GtkTextBuffer* ref_buffer;
};

struct _KeyEditorChildDefault {
	GtkEntry parent_instance;
	KeyEditorChildDefaultPrivate * priv;
};

struct _KeyEditorChildDefaultClass {
	GtkEntryClass parent_class;
};

struct _KeyEditorChildDefaultPrivate {
	gchar* key_type;
	GVariant* variant;
	gboolean is_string;
	gulong deleted_text_handler;
	gulong inserted_text_handler;
};

struct _Block13Data {
	int _ref_count_;
	KeyEditorChildDefault* self;
	GtkEntryBuffer* ref_buffer;
	gulong entry_activate_handler;
};

static gint KeyEditorChildSingle_private_offset;
static gpointer key_editor_child_single_parent_class = NULL;
static KeyEditorChildIface * key_editor_child_single_key_editor_child_parent_iface = NULL;
static gint KeyEditorChildEnum_private_offset;
static gpointer key_editor_child_enum_parent_class = NULL;
static KeyEditorChildIface * key_editor_child_enum_key_editor_child_parent_iface = NULL;
static gint KeyEditorChildFlags_private_offset;
static gpointer key_editor_child_flags_parent_class = NULL;
static KeyEditorChildIface * key_editor_child_flags_key_editor_child_parent_iface = NULL;
static gint KeyEditorChildNullableBool_private_offset;
static gpointer key_editor_child_nullable_bool_parent_class = NULL;
static KeyEditorChildIface * key_editor_child_nullable_bool_key_editor_child_parent_iface = NULL;
static gint KeyEditorChildBool_private_offset;
static gpointer key_editor_child_bool_parent_class = NULL;
static KeyEditorChildIface * key_editor_child_bool_key_editor_child_parent_iface = NULL;
static gint KeyEditorChildNumberCustom_private_offset;
static gpointer key_editor_child_number_custom_parent_class = NULL;
static KeyEditorChildIface * key_editor_child_number_custom_key_editor_child_parent_iface = NULL;
static gint KeyEditorChildNumberDouble_private_offset;
static gpointer key_editor_child_number_double_parent_class = NULL;
static gint KeyEditorChildNumberInt64_private_offset;
static gpointer key_editor_child_number_int64_parent_class = NULL;
static gint KeyEditorChildNumberUint64_private_offset;
static gpointer key_editor_child_number_uint64_parent_class = NULL;
static gint KeyEditorChildNumberInt_private_offset;
static gpointer key_editor_child_number_int_parent_class = NULL;
static KeyEditorChildIface * key_editor_child_number_int_key_editor_child_parent_iface = NULL;
static gint KeyEditorChildArray_private_offset;
static gpointer key_editor_child_array_parent_class = NULL;
static KeyEditorChildIface * key_editor_child_array_key_editor_child_parent_iface = NULL;
static gint KeyEditorChildDefault_private_offset;
static gpointer key_editor_child_default_parent_class = NULL;
static KeyEditorChildIface * key_editor_child_default_key_editor_child_parent_iface = NULL;

VALA_EXTERN GType key_editor_child_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (KeyEditorChild, g_object_unref)
VALA_EXTERN GVariant* key_editor_child_get_variant (KeyEditorChild* self);
VALA_EXTERN void key_editor_child_reload (KeyEditorChild* self,
                              GVariant* gvariant);
VALA_EXTERN void key_editor_child_set_lock_on (GObject* buffer,
                                   gulong deleted_text_handler,
                                   gulong inserted_text_handler);
VALA_EXTERN void key_editor_child_set_lock_off (GObject* buffer,
                                    gulong deleted_text_handler,
                                    gulong inserted_text_handler);
static GType key_editor_child_get_type_once (void);
VALA_EXTERN GType key_editor_child_single_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (KeyEditorChildSingle, g_object_unref)
VALA_EXTERN KeyEditorChildSingle* key_editor_child_single_new (GVariant* key_value,
                                                   const gchar* text);
VALA_EXTERN KeyEditorChildSingle* key_editor_child_single_construct (GType object_type,
                                                         GVariant* key_value,
                                                         const gchar* text);
static GVariant* key_editor_child_single_real_get_variant (KeyEditorChild* base);
static void key_editor_child_single_real_reload (KeyEditorChild* base,
                                          GVariant* gvariant);
static void key_editor_child_single_finalize (GObject * obj);
static GType key_editor_child_single_get_type_once (void);
VALA_EXTERN GType key_editor_child_enum_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (KeyEditorChildEnum, g_object_unref)
VALA_EXTERN KeyEditorChildEnum* key_editor_child_enum_new (GVariant* initial_value,
                                               gboolean delay_mode,
                                               gboolean has_planned_change,
                                               GVariant* range_content);
VALA_EXTERN KeyEditorChildEnum* key_editor_child_enum_construct (GType object_type,
                                                     GVariant* initial_value,
                                                     gboolean delay_mode,
                                                     gboolean has_planned_change,
                                                     GVariant* range_content);
VALA_EXTERN GType context_popover_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ContextPopover, g_object_unref)
VALA_EXTERN ContextPopover* context_popover_new (void);
VALA_EXTERN ContextPopover* context_popover_construct (GType object_type);
VALA_EXTERN GAction* context_popover_create_buttons_list (ContextPopover* self,
                                              gboolean display_default_value,
                                              gboolean delayed_apply_menu,
                                              gboolean planned_change,
                                              const gchar* settings_type,
                                              GVariant* range_content_or_null,
                                              GVariant* value_variant);
static void key_editor_child_enum_on_popover_value_changed (KeyEditorChildEnum* self,
                                                     ContextPopover* _popover,
                                                     GVariant* gvariant);
static void _key_editor_child_enum_on_popover_value_changed_context_popover_value_changed (ContextPopover* _sender,
                                                                                    GVariant* gvariant,
                                                                                    gpointer self);
static GVariant* key_editor_child_enum_real_get_variant (KeyEditorChild* base);
static void key_editor_child_enum_real_reload (KeyEditorChild* base,
                                        GVariant* gvariant);
static void key_editor_child_enum_finalize (GObject * obj);
static GType key_editor_child_enum_get_type_once (void);
VALA_EXTERN GType key_editor_child_flags_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (KeyEditorChildFlags, g_object_unref)
VALA_EXTERN KeyEditorChildFlags* key_editor_child_flags_new (GVariant* initial_value,
                                                 gchar** _all_flags,
                                                 gint _all_flags_length1);
VALA_EXTERN KeyEditorChildFlags* key_editor_child_flags_construct (GType object_type,
                                                       GVariant* initial_value,
                                                       gchar** _all_flags,
                                                       gint _all_flags_length1);
static gchar** _vala_array_dup7 (gchar** self,
                          gssize length);
VALA_EXTERN void context_popover_create_flags_list (ContextPopover* self,
                                        gchar** active_flags,
                                        gint active_flags_length1,
                                        gchar** all_flags,
                                        gint all_flags_length1);
static void key_editor_child_flags_on_popover_value_changed (KeyEditorChildFlags* self,
                                                      GtkPopover* _popover,
                                                      GVariant* gvariant);
static void _key_editor_child_flags_on_popover_value_changed_context_popover_value_changed (ContextPopover* _sender,
                                                                                     GVariant* gvariant,
                                                                                     gpointer self);
VALA_EXTERN void key_editor_child_flags_update_flags (KeyEditorChildFlags* self,
                                          gchar** active_flags,
                                          gint active_flags_length1);
VALA_EXTERN void context_popover_update_flag_status (ContextPopover* self,
                                         const gchar* flag,
                                         gboolean active);
static gboolean _vala_string_array_contains (gchar* * stack,
                                      gssize stack_length,
                                      const gchar* needle);
static GVariant* key_editor_child_flags_real_get_variant (KeyEditorChild* base);
static void key_editor_child_flags_real_reload (KeyEditorChild* base,
                                         GVariant* gvariant);
static void key_editor_child_flags_finalize (GObject * obj);
static GType key_editor_child_flags_get_type_once (void);
VALA_EXTERN GType key_editor_child_nullable_bool_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (KeyEditorChildNullableBool, g_object_unref)
VALA_EXTERN KeyEditorChildNullableBool* key_editor_child_nullable_bool_new (GVariant* initial_value,
                                                                gboolean delay_mode,
                                                                gboolean has_planned_change,
                                                                gboolean has_schema);
VALA_EXTERN KeyEditorChildNullableBool* key_editor_child_nullable_bool_construct (GType object_type,
                                                                      GVariant* initial_value,
                                                                      gboolean delay_mode,
                                                                      gboolean has_planned_change,
                                                                      gboolean has_schema);
static void key_editor_child_nullable_bool_on_popover_value_changed (KeyEditorChildNullableBool* self,
                                                              GtkPopover* _popover,
                                                              GVariant* gvariant);
static void _key_editor_child_nullable_bool_on_popover_value_changed_context_popover_value_changed (ContextPopover* _sender,
                                                                                             GVariant* gvariant,
                                                                                             gpointer self);
static GVariant* key_editor_child_nullable_bool_real_get_variant (KeyEditorChild* base);
static void key_editor_child_nullable_bool_real_reload (KeyEditorChild* base,
                                                 GVariant* gvariant);
VALA_EXTERN gchar* key_cool_boolean_text_value (gboolean* nullable_boolean,
                                    gboolean capitalized);
static void key_editor_child_nullable_bool_finalize (GObject * obj);
static GType key_editor_child_nullable_bool_get_type_once (void);
VALA_EXTERN GType key_editor_child_bool_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (KeyEditorChildBool, g_object_unref)
VALA_EXTERN KeyEditorChildBool* key_editor_child_bool_new (gboolean initial_value);
VALA_EXTERN KeyEditorChildBool* key_editor_child_bool_construct (GType object_type,
                                                     gboolean initial_value);
static void __lambda57_ (KeyEditorChildBool* self);
static void ___lambda57__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                             gpointer self);
static GVariant* key_editor_child_bool_real_get_variant (KeyEditorChild* base);
static void key_editor_child_bool_real_reload (KeyEditorChild* base,
                                        GVariant* gvariant);
static void key_editor_child_bool_finalize (GObject * obj);
static GType key_editor_child_bool_get_type_once (void);
VALA_EXTERN GType key_editor_child_number_custom_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (KeyEditorChildNumberCustom, g_object_unref)
VALA_EXTERN gboolean key_editor_child_number_custom_test_value (KeyEditorChildNumberCustom* self);
VALA_EXTERN void key_editor_child_number_custom_connect_entry (KeyEditorChildNumberCustom* self);
static Block10Data* block10_data_ref (Block10Data* _data10_);
static void block10_data_unref (void * _userdata_);
static void __lambda62_ (KeyEditorChildNumberCustom* self);
static void ___lambda62__gtk_entry_buffer_deleted_text (GtkEntryBuffer* _sender,
                                                 guint position,
                                                 guint n_chars,
                                                 gpointer self);
static void __lambda63_ (KeyEditorChildNumberCustom* self);
static void ___lambda63__gtk_entry_buffer_inserted_text (GtkEntryBuffer* _sender,
                                                  guint position,
                                                  const gchar* chars,
                                                  guint n_chars,
                                                  gpointer self);
static void __lambda64_ (KeyEditorChildNumberCustom* self);
static void ___lambda64__gtk_entry_activate (GtkEntry* _sender,
                                      gpointer self);
static void key_editor_child_number_custom_set_error_class (KeyEditorChildNumberCustom* self);
static void _key_editor_child_number_custom_set_error_class_g_object_notify (GObject* _sender,
                                                                      GParamSpec* pspec,
                                                                      gpointer self);
static void __lambda65_ (Block10Data* _data10_);
static void ___lambda65__gtk_widget_destroy (GtkWidget* _sender,
                                      gpointer self);
VALA_EXTERN void key_editor_child_number_custom_show_error (KeyEditorChildNumberCustom* self,
                                                gboolean show);
static GVariant* key_editor_child_number_custom_real_get_variant (KeyEditorChild* base);
static void key_editor_child_number_custom_real_reload (KeyEditorChild* base,
                                                 GVariant* gvariant);
static gboolean key_editor_child_number_custom_real_test_value (KeyEditorChildNumberCustom* self);
VALA_EXTERN KeyEditorChildNumberCustom* key_editor_child_number_custom_construct (GType object_type);
static GObject * key_editor_child_number_custom_constructor (GType type,
                                                      guint n_construct_properties,
                                                      GObjectConstructParam * construct_properties);
static void key_editor_child_number_custom_finalize (GObject * obj);
static GType key_editor_child_number_custom_get_type_once (void);
VALA_EXTERN GType key_editor_child_number_double_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (KeyEditorChildNumberDouble, g_object_unref)
VALA_EXTERN KeyEditorChildNumberDouble* key_editor_child_number_double_new (GVariant* initial_value,
                                                                GVariant* range_content_or_null);
VALA_EXTERN KeyEditorChildNumberDouble* key_editor_child_number_double_construct (GType object_type,
                                                                      GVariant* initial_value,
                                                                      GVariant* range_content_or_null);
static void key_editor_child_number_double_switch_icon_tooltip_text (KeyEditorChildNumberDouble* self,
                                                              gboolean range_error);
static gboolean key_editor_child_number_double_real_test_value (KeyEditorChildNumberCustom* base);
static void key_editor_child_number_double_finalize (GObject * obj);
static GType key_editor_child_number_double_get_type_once (void);
VALA_EXTERN GType key_editor_child_number_int64_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (KeyEditorChildNumberInt64, g_object_unref)
VALA_EXTERN KeyEditorChildNumberInt64* key_editor_child_number_int64_new (GVariant* initial_value,
                                                              GVariant* range_content_or_null);
VALA_EXTERN KeyEditorChildNumberInt64* key_editor_child_number_int64_construct (GType object_type,
                                                                    GVariant* initial_value,
                                                                    GVariant* range_content_or_null);
static void key_editor_child_number_int64_switch_icon_tooltip_text (KeyEditorChildNumberInt64* self,
                                                             gboolean range_error);
static gboolean key_editor_child_number_int64_real_test_value (KeyEditorChildNumberCustom* base);
static void key_editor_child_number_int64_finalize (GObject * obj);
static GType key_editor_child_number_int64_get_type_once (void);
VALA_EXTERN GType key_editor_child_number_uint64_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (KeyEditorChildNumberUint64, g_object_unref)
VALA_EXTERN KeyEditorChildNumberUint64* key_editor_child_number_uint64_new (GVariant* initial_value,
                                                                GVariant* range_content_or_null);
VALA_EXTERN KeyEditorChildNumberUint64* key_editor_child_number_uint64_construct (GType object_type,
                                                                      GVariant* initial_value,
                                                                      GVariant* range_content_or_null);
static void key_editor_child_number_uint64_switch_icon_tooltip_text (KeyEditorChildNumberUint64* self,
                                                              gboolean range_error);
static gboolean key_editor_child_number_uint64_real_test_value (KeyEditorChildNumberCustom* base);
static void key_editor_child_number_uint64_finalize (GObject * obj);
static GType key_editor_child_number_uint64_get_type_once (void);
VALA_EXTERN GType key_editor_child_number_int_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (KeyEditorChildNumberInt, g_object_unref)
VALA_EXTERN KeyEditorChildNumberInt* key_editor_child_number_int_new (GVariant* initial_value,
                                                          const gchar* type_string,
                                                          GVariant* range_content_or_null);
VALA_EXTERN KeyEditorChildNumberInt* key_editor_child_number_int_construct (GType object_type,
                                                                GVariant* initial_value,
                                                                const gchar* type_string,
                                                                GVariant* range_content_or_null);
static Block11Data* block11_data_ref (Block11Data* _data11_);
static void block11_data_unref (void * _userdata_);
static gdouble key_editor_child_number_int_get_variant_as_double (GVariant* variant);
static gint64 key_editor_child_number_int_get_variant_as_int64 (GVariant* variant);
static void key_editor_child_number_int_get_min_and_max_double (gdouble* min,
                                                         gdouble* max,
                                                         const gchar* variant_type);
static void key_editor_child_number_int_get_min_and_max_int64 (gint64* min,
                                                        gint64* max,
                                                        const gchar* variant_type);
static void __lambda58_ (KeyEditorChildNumberInt* self);
static gboolean key_editor_child_number_int_test_value (KeyEditorChildNumberInt* self);
static void ___lambda58__gtk_entry_buffer_deleted_text (GtkEntryBuffer* _sender,
                                                 guint position,
                                                 guint n_chars,
                                                 gpointer self);
static void __lambda59_ (KeyEditorChildNumberInt* self);
static void ___lambda59__gtk_entry_buffer_inserted_text (GtkEntryBuffer* _sender,
                                                  guint position,
                                                  const gchar* chars,
                                                  guint n_chars,
                                                  gpointer self);
static void __lambda60_ (KeyEditorChildNumberInt* self);
static void ___lambda60__gtk_entry_activate (GtkEntry* _sender,
                                      gpointer self);
static void key_editor_child_number_int_set_error_class (KeyEditorChildNumberInt* self);
static void _key_editor_child_number_int_set_error_class_g_object_notify (GObject* _sender,
                                                                   GParamSpec* pspec,
                                                                   gpointer self);
static void __lambda61_ (Block11Data* _data11_);
static void ___lambda61__gtk_widget_destroy (GtkWidget* _sender,
                                      gpointer self);
static GVariant* key_editor_child_number_int_real_get_variant (KeyEditorChild* base);
static void key_editor_child_number_int_real_reload (KeyEditorChild* base,
                                              GVariant* gvariant);
static GVariant* key_editor_child_number_int_get_variant_from_int64 (gint64 int64_value,
                                                              const gchar* key_type);
static void key_editor_child_number_int_finalize (GObject * obj);
static GType key_editor_child_number_int_get_type_once (void);
VALA_EXTERN GType key_editor_child_array_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (KeyEditorChildArray, g_object_unref)
VALA_EXTERN KeyEditorChildArray* key_editor_child_array_new (const gchar* type_string,
                                                 GVariant* initial_value);
VALA_EXTERN KeyEditorChildArray* key_editor_child_array_construct (GType object_type,
                                                       const gchar* type_string,
                                                       GVariant* initial_value);
static Block12Data* block12_data_ref (Block12Data* _data12_);
static void block12_data_unref (void * _userdata_);
static gboolean key_editor_child_array_on_key_press_event (KeyEditorChildArray* self,
                                                    GdkEventKey* event);
static gboolean _key_editor_child_array_on_key_press_event_gtk_widget_key_press_event (GtkWidget* _sender,
                                                                                GdkEventKey* event,
                                                                                gpointer self);
static gboolean key_editor_child_array_event_stop (void);
static gboolean _key_editor_child_array_event_stop_gtk_widget_button_press_event (GtkWidget* _sender,
                                                                           GdkEventButton* event,
                                                                           gpointer self);
static gboolean _key_editor_child_array_event_stop_gtk_widget_button_release_event (GtkWidget* _sender,
                                                                             GdkEventButton* event,
                                                                             gpointer self);
static void __lambda68_ (KeyEditorChildArray* self);
static gboolean key_editor_child_array_test_value (KeyEditorChildArray* self);
static void ___lambda68__gtk_text_buffer_delete_range (GtkTextBuffer* _sender,
                                                GtkTextIter* start,
                                                GtkTextIter* end,
                                                gpointer self);
static void __lambda69_ (KeyEditorChildArray* self);
static void ___lambda69__gtk_text_buffer_insert_text (GtkTextBuffer* _sender,
                                               GtkTextIter* pos,
                                               const gchar* new_text,
                                               gint new_text_length,
                                               gpointer self);
static void __lambda70_ (Block12Data* _data12_);
static void ___lambda70__gtk_widget_destroy (GtkWidget* _sender,
                                      gpointer self);
static GVariant* key_editor_child_array_real_get_variant (KeyEditorChild* base);
static void key_editor_child_array_real_reload (KeyEditorChild* base,
                                         GVariant* gvariant);
static GObject * key_editor_child_array_constructor (GType type,
                                              guint n_construct_properties,
                                              GObjectConstructParam * construct_properties);
static void key_editor_child_array_finalize (GObject * obj);
static GType key_editor_child_array_get_type_once (void);
VALA_EXTERN GType key_editor_child_default_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (KeyEditorChildDefault, g_object_unref)
VALA_EXTERN KeyEditorChildDefault* key_editor_child_default_new (const gchar* type_string,
                                                     GVariant* initial_value);
VALA_EXTERN KeyEditorChildDefault* key_editor_child_default_construct (GType object_type,
                                                           const gchar* type_string,
                                                           GVariant* initial_value);
static Block13Data* block13_data_ref (Block13Data* _data13_);
static void block13_data_unref (void * _userdata_);
static void __lambda71_ (KeyEditorChildDefault* self);
static gboolean key_editor_child_default_test_value (KeyEditorChildDefault* self);
static void ___lambda71__gtk_entry_buffer_deleted_text (GtkEntryBuffer* _sender,
                                                 guint position,
                                                 guint n_chars,
                                                 gpointer self);
static void __lambda72_ (KeyEditorChildDefault* self);
static void ___lambda72__gtk_entry_buffer_inserted_text (GtkEntryBuffer* _sender,
                                                  guint position,
                                                  const gchar* chars,
                                                  guint n_chars,
                                                  gpointer self);
static void __lambda73_ (KeyEditorChildDefault* self);
static void ___lambda73__gtk_entry_activate (GtkEntry* _sender,
                                      gpointer self);
static void __lambda74_ (Block13Data* _data13_);
static void ___lambda74__gtk_widget_destroy (GtkWidget* _sender,
                                      gpointer self);
static GVariant* key_editor_child_default_real_get_variant (KeyEditorChild* base);
static void key_editor_child_default_real_reload (KeyEditorChild* base,
                                           GVariant* gvariant);
static GObject * key_editor_child_default_constructor (GType type,
                                                guint n_construct_properties,
                                                GObjectConstructParam * construct_properties);
static void key_editor_child_default_finalize (GObject * obj);
static GType key_editor_child_default_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);

GVariant*
key_editor_child_get_variant (KeyEditorChild* self)
{
	KeyEditorChildIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = KEY_EDITOR_CHILD_GET_INTERFACE (self);
	if (_iface_->get_variant) {
		return _iface_->get_variant (self);
	}
	return NULL;
}

void
key_editor_child_reload (KeyEditorChild* self,
                         GVariant* gvariant)
{
	KeyEditorChildIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = KEY_EDITOR_CHILD_GET_INTERFACE (self);
	if (_iface_->reload) {
		_iface_->reload (self, gvariant);
	}
}

void
key_editor_child_set_lock_on (GObject* buffer,
                              gulong deleted_text_handler,
                              gulong inserted_text_handler)
{
	g_return_if_fail (buffer != NULL);
	_vala_return_if_fail (deleted_text_handler != ((gulong) 0), "deleted_text_handler != 0");
	_vala_return_if_fail (inserted_text_handler != ((gulong) 0), "inserted_text_handler != 0");
	g_signal_handler_block (buffer, deleted_text_handler);
	g_signal_handler_block (buffer, inserted_text_handler);
}

void
key_editor_child_set_lock_off (GObject* buffer,
                               gulong deleted_text_handler,
                               gulong inserted_text_handler)
{
	g_return_if_fail (buffer != NULL);
	_vala_return_if_fail (deleted_text_handler != ((gulong) 0), "deleted_text_handler != 0");
	_vala_return_if_fail (inserted_text_handler != ((gulong) 0), "inserted_text_handler != 0");
	g_signal_handler_unblock (buffer, deleted_text_handler);
	g_signal_handler_unblock (buffer, inserted_text_handler);
}

static void
key_editor_child_default_init (KeyEditorChildIface * iface,
                               gpointer iface_data)
{
	key_editor_child_signals[KEY_EDITOR_CHILD_VALUE_HAS_CHANGED_SIGNAL] = g_signal_new ("value-has-changed", TYPE_KEY_EDITOR_CHILD, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN, G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
	key_editor_child_signals[KEY_EDITOR_CHILD_CHILD_ACTIVATED_SIGNAL] = g_signal_new ("child-activated", TYPE_KEY_EDITOR_CHILD, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static GType
key_editor_child_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (KeyEditorChildIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) key_editor_child_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType key_editor_child_type_id;
	key_editor_child_type_id = g_type_register_static (G_TYPE_INTERFACE, "KeyEditorChild", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (key_editor_child_type_id, gtk_widget_get_type ());
	return key_editor_child_type_id;
}

GType
key_editor_child_get_type (void)
{
	static volatile gsize key_editor_child_type_id__once = 0;
	if (g_once_init_enter (&key_editor_child_type_id__once)) {
		GType key_editor_child_type_id;
		key_editor_child_type_id = key_editor_child_get_type_once ();
		g_once_init_leave (&key_editor_child_type_id__once, key_editor_child_type_id);
	}
	return key_editor_child_type_id__once;
}

static inline gpointer
key_editor_child_single_get_instance_private (KeyEditorChildSingle* self)
{
	return G_STRUCT_MEMBER_P (self, KeyEditorChildSingle_private_offset);
}

static gpointer
_g_variant_ref0 (gpointer self)
{
	return self ? g_variant_ref (self) : NULL;
}

KeyEditorChildSingle*
key_editor_child_single_construct (GType object_type,
                                   GVariant* key_value,
                                   const gchar* text)
{
	KeyEditorChildSingle * self = NULL;
	GVariant* _tmp0_;
	g_return_val_if_fail (key_value != NULL, NULL);
	g_return_val_if_fail (text != NULL, NULL);
	self = (KeyEditorChildSingle*) g_object_new (object_type, NULL);
	_tmp0_ = _g_variant_ref0 (key_value);
	_g_variant_unref0 (self->priv->variant);
	self->priv->variant = _tmp0_;
	gtk_label_set_label ((GtkLabel*) self, text);
	gtk_widget_show ((GtkWidget*) self);
	return self;
}

KeyEditorChildSingle*
key_editor_child_single_new (GVariant* key_value,
                             const gchar* text)
{
	return key_editor_child_single_construct (TYPE_KEY_EDITOR_CHILD_SINGLE, key_value, text);
}

static GVariant*
key_editor_child_single_real_get_variant (KeyEditorChild* base)
{
	KeyEditorChildSingle * self;
	GVariant* _tmp0_;
	GVariant* _tmp1_;
	GVariant* result;
	self = (KeyEditorChildSingle*) base;
	_tmp0_ = self->priv->variant;
	_tmp1_ = _g_variant_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}

static void
key_editor_child_single_real_reload (KeyEditorChild* base,
                                     GVariant* gvariant)
{
	KeyEditorChildSingle * self;
	self = (KeyEditorChildSingle*) base;
	g_return_if_fail (gvariant != NULL);
}

static void
key_editor_child_single_class_init (KeyEditorChildSingleClass * klass,
                                    gpointer klass_data)
{
	key_editor_child_single_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &KeyEditorChildSingle_private_offset);
	G_OBJECT_CLASS (klass)->finalize = key_editor_child_single_finalize;
}

static void
key_editor_child_single_key_editor_child_interface_init (KeyEditorChildIface * iface,
                                                         gpointer iface_data)
{
	key_editor_child_single_key_editor_child_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_variant = (GVariant* (*) (KeyEditorChild*)) key_editor_child_single_real_get_variant;
	iface->reload = (void (*) (KeyEditorChild*, GVariant*)) key_editor_child_single_real_reload;
}

static void
key_editor_child_single_instance_init (KeyEditorChildSingle * self,
                                       gpointer klass)
{
	self->priv = key_editor_child_single_get_instance_private (self);
}

static void
key_editor_child_single_finalize (GObject * obj)
{
	KeyEditorChildSingle * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_KEY_EDITOR_CHILD_SINGLE, KeyEditorChildSingle);
	_g_variant_unref0 (self->priv->variant);
	G_OBJECT_CLASS (key_editor_child_single_parent_class)->finalize (obj);
}

static GType
key_editor_child_single_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (KeyEditorChildSingleClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) key_editor_child_single_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (KeyEditorChildSingle), 0, (GInstanceInitFunc) key_editor_child_single_instance_init, NULL };
	static const GInterfaceInfo key_editor_child_info = { (GInterfaceInitFunc) key_editor_child_single_key_editor_child_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType key_editor_child_single_type_id;
	key_editor_child_single_type_id = g_type_register_static (gtk_label_get_type (), "KeyEditorChildSingle", &g_define_type_info, 0);
	g_type_add_interface_static (key_editor_child_single_type_id, TYPE_KEY_EDITOR_CHILD, &key_editor_child_info);
	KeyEditorChildSingle_private_offset = g_type_add_instance_private (key_editor_child_single_type_id, sizeof (KeyEditorChildSinglePrivate));
	return key_editor_child_single_type_id;
}

GType
key_editor_child_single_get_type (void)
{
	static volatile gsize key_editor_child_single_type_id__once = 0;
	if (g_once_init_enter (&key_editor_child_single_type_id__once)) {
		GType key_editor_child_single_type_id;
		key_editor_child_single_type_id = key_editor_child_single_get_type_once ();
		g_once_init_leave (&key_editor_child_single_type_id__once, key_editor_child_single_type_id);
	}
	return key_editor_child_single_type_id__once;
}

static inline gpointer
key_editor_child_enum_get_instance_private (KeyEditorChildEnum* self)
{
	return G_STRUCT_MEMBER_P (self, KeyEditorChildEnum_private_offset);
}

static void
_key_editor_child_enum_on_popover_value_changed_context_popover_value_changed (ContextPopover* _sender,
                                                                               GVariant* gvariant,
                                                                               gpointer self)
{
	key_editor_child_enum_on_popover_value_changed ((KeyEditorChildEnum*) self, _sender, gvariant);
}

KeyEditorChildEnum*
key_editor_child_enum_construct (GType object_type,
                                 GVariant* initial_value,
                                 gboolean delay_mode,
                                 gboolean has_planned_change,
                                 GVariant* range_content)
{
	KeyEditorChildEnum * self = NULL;
	ContextPopover* popover = NULL;
	ContextPopover* _tmp0_;
	GAction* _tmp1_;
	g_return_val_if_fail (initial_value != NULL, NULL);
	g_return_val_if_fail (range_content != NULL, NULL);
	self = (KeyEditorChildEnum*) g_object_new (object_type, NULL);
	gtk_widget_set_visible ((GtkWidget*) self, TRUE);
	gtk_widget_set_hexpand ((GtkWidget*) self, TRUE);
	gtk_widget_set_halign ((GtkWidget*) self, GTK_ALIGN_START);
	gtk_menu_button_set_use_popover ((GtkMenuButton*) self, TRUE);
	g_object_set ((GtkWidget*) self, "width-request", 100, NULL);
	_tmp0_ = context_popover_new ();
	g_object_ref_sink (_tmp0_);
	popover = _tmp0_;
	_tmp1_ = context_popover_create_buttons_list (popover, FALSE, delay_mode, has_planned_change, "<enum>", range_content, initial_value);
	_g_object_unref0 (self->priv->action);
	self->priv->action = _tmp1_;
	gtk_popover_set_relative_to ((GtkPopover*) popover, (GtkWidget*) self);
	g_signal_connect_object (popover, "value-changed", (GCallback) _key_editor_child_enum_on_popover_value_changed_context_popover_value_changed, self, 0);
	key_editor_child_reload ((KeyEditorChild*) self, initial_value);
	gtk_menu_button_set_popover ((GtkMenuButton*) self, (GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (popover, gtk_popover_get_type (), GtkPopover));
	_g_object_unref0 (popover);
	return self;
}

KeyEditorChildEnum*
key_editor_child_enum_new (GVariant* initial_value,
                           gboolean delay_mode,
                           gboolean has_planned_change,
                           GVariant* range_content)
{
	return key_editor_child_enum_construct (TYPE_KEY_EDITOR_CHILD_ENUM, initial_value, delay_mode, has_planned_change, range_content);
}

static void
key_editor_child_enum_on_popover_value_changed (KeyEditorChildEnum* self,
                                                ContextPopover* _popover,
                                                GVariant* gvariant)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (_popover != NULL);
	_vala_return_if_fail (gvariant != NULL, "gvariant != null");
	key_editor_child_reload ((KeyEditorChild*) self, (GVariant*) gvariant);
	g_signal_emit_by_name ((GtkPopover*) _popover, "closed");
	g_signal_emit ((KeyEditorChild*) self, key_editor_child_signals[KEY_EDITOR_CHILD_VALUE_HAS_CHANGED_SIGNAL], 0, TRUE);
}

static GVariant*
key_editor_child_enum_real_get_variant (KeyEditorChild* base)
{
	KeyEditorChildEnum * self;
	GVariant* _tmp0_;
	GVariant* _tmp1_;
	GVariant* result;
	self = (KeyEditorChildEnum*) base;
	_tmp0_ = self->priv->variant;
	_tmp1_ = _g_variant_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}

static gpointer
_g_variant_type_copy0 (gpointer self)
{
	return self ? g_variant_type_copy (self) : NULL;
}

static void
key_editor_child_enum_real_reload (KeyEditorChild* base,
                                   GVariant* gvariant)
{
	KeyEditorChildEnum * self;
	GVariant* _tmp0_;
	GVariantType* type = NULL;
	const GVariantType* _tmp1_;
	GVariantType* _tmp2_;
	gchar* _tmp3_ = NULL;
	const GVariantType* _tmp4_;
	const GVariantType* _tmp5_;
	GAction* _tmp9_;
	const GVariantType* _tmp10_;
	GVariant* _tmp11_;
	GVariant* _tmp12_;
	GVariant* _tmp13_;
	GVariant* _tmp14_;
	self = (KeyEditorChildEnum*) base;
	g_return_if_fail (gvariant != NULL);
	_tmp0_ = _g_variant_ref0 (gvariant);
	_g_variant_unref0 (self->priv->variant);
	self->priv->variant = _tmp0_;
	_tmp1_ = g_variant_get_type (gvariant);
	_tmp2_ = _g_variant_type_copy0 (_tmp1_);
	type = _tmp2_;
	_tmp4_ = type;
	_tmp5_ = G_VARIANT_TYPE_STRING;
	if (_tmp4_ == _tmp5_) {
		const gchar* _tmp6_;
		gchar* _tmp7_;
		_tmp6_ = g_variant_get_string (gvariant, NULL);
		_tmp7_ = g_strdup (_tmp6_);
		_g_free0 (_tmp3_);
		_tmp3_ = _tmp7_;
	} else {
		gchar* _tmp8_;
		_tmp8_ = g_variant_print (gvariant, FALSE);
		_g_free0 (_tmp3_);
		_tmp3_ = _tmp8_;
	}
	gtk_button_set_label ((GtkButton*) self, _tmp3_);
	_tmp9_ = self->priv->action;
	_tmp10_ = type;
	_tmp11_ = g_variant_new_maybe (_tmp10_, gvariant);
	g_variant_ref_sink (_tmp11_);
	_tmp12_ = _tmp11_;
	_tmp13_ = g_variant_new_maybe (NULL, _tmp12_);
	g_variant_ref_sink (_tmp13_);
	_tmp14_ = _tmp13_;
	g_action_change_state (_tmp9_, _tmp14_);
	_g_variant_unref0 (_tmp14_);
	_g_variant_unref0 (_tmp12_);
	_g_free0 (_tmp3_);
	_g_variant_type_free0 (type);
}

static void
key_editor_child_enum_class_init (KeyEditorChildEnumClass * klass,
                                  gpointer klass_data)
{
	key_editor_child_enum_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &KeyEditorChildEnum_private_offset);
	G_OBJECT_CLASS (klass)->finalize = key_editor_child_enum_finalize;
}

static void
key_editor_child_enum_key_editor_child_interface_init (KeyEditorChildIface * iface,
                                                       gpointer iface_data)
{
	key_editor_child_enum_key_editor_child_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_variant = (GVariant* (*) (KeyEditorChild*)) key_editor_child_enum_real_get_variant;
	iface->reload = (void (*) (KeyEditorChild*, GVariant*)) key_editor_child_enum_real_reload;
}

static void
key_editor_child_enum_instance_init (KeyEditorChildEnum * self,
                                     gpointer klass)
{
	self->priv = key_editor_child_enum_get_instance_private (self);
}

static void
key_editor_child_enum_finalize (GObject * obj)
{
	KeyEditorChildEnum * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_KEY_EDITOR_CHILD_ENUM, KeyEditorChildEnum);
	_g_variant_unref0 (self->priv->variant);
	_g_object_unref0 (self->priv->action);
	G_OBJECT_CLASS (key_editor_child_enum_parent_class)->finalize (obj);
}

static GType
key_editor_child_enum_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (KeyEditorChildEnumClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) key_editor_child_enum_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (KeyEditorChildEnum), 0, (GInstanceInitFunc) key_editor_child_enum_instance_init, NULL };
	static const GInterfaceInfo key_editor_child_info = { (GInterfaceInitFunc) key_editor_child_enum_key_editor_child_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType key_editor_child_enum_type_id;
	key_editor_child_enum_type_id = g_type_register_static (gtk_menu_button_get_type (), "KeyEditorChildEnum", &g_define_type_info, 0);
	g_type_add_interface_static (key_editor_child_enum_type_id, TYPE_KEY_EDITOR_CHILD, &key_editor_child_info);
	KeyEditorChildEnum_private_offset = g_type_add_instance_private (key_editor_child_enum_type_id, sizeof (KeyEditorChildEnumPrivate));
	return key_editor_child_enum_type_id;
}

GType
key_editor_child_enum_get_type (void)
{
	static volatile gsize key_editor_child_enum_type_id__once = 0;
	if (g_once_init_enter (&key_editor_child_enum_type_id__once)) {
		GType key_editor_child_enum_type_id;
		key_editor_child_enum_type_id = key_editor_child_enum_get_type_once ();
		g_once_init_leave (&key_editor_child_enum_type_id__once, key_editor_child_enum_type_id);
	}
	return key_editor_child_enum_type_id__once;
}

static inline gpointer
key_editor_child_flags_get_instance_private (KeyEditorChildFlags* self)
{
	return G_STRUCT_MEMBER_P (self, KeyEditorChildFlags_private_offset);
}

static gchar**
_vala_array_dup7 (gchar** self,
                  gssize length)
{
	if (length >= 0) {
		gchar** result;
		gssize i;
		result = g_new0 (gchar*, length + 1);
		for (i = 0; i < length; i++) {
			gchar* _tmp0_;
			_tmp0_ = g_strdup (self[i]);
			result[i] = _tmp0_;
		}
		return result;
	}
	return NULL;
}

static void
_key_editor_child_flags_on_popover_value_changed_context_popover_value_changed (ContextPopover* _sender,
                                                                                GVariant* gvariant,
                                                                                gpointer self)
{
	key_editor_child_flags_on_popover_value_changed ((KeyEditorChildFlags*) self, _sender, gvariant);
}

KeyEditorChildFlags*
key_editor_child_flags_construct (GType object_type,
                                  GVariant* initial_value,
                                  gchar** _all_flags,
                                  gint _all_flags_length1)
{
	KeyEditorChildFlags * self = NULL;
	gchar** _tmp0_;
	gint _tmp0__length1;
	GtkMenuButton* button = NULL;
	GtkMenuButton* _tmp1_;
	GtkStyleContext* _tmp2_;
	GtkLabel* _tmp3_;
	GtkLabel* _tmp4_;
	GtkLabel* _tmp5_;
	GtkLabel* _tmp6_;
	ContextPopover* _tmp7_;
	gsize _tmp8_ = 0;
	const gchar** _tmp9_;
	const gchar** _tmp10_;
	gint _tmp10__length1;
	gchar** _tmp11_;
	gint _tmp11__length1;
	ContextPopover* _tmp12_;
	ContextPopover* _tmp13_;
	ContextPopover* _tmp14_;
	g_return_val_if_fail (initial_value != NULL, NULL);
	self = (KeyEditorChildFlags*) g_object_new (object_type, NULL);
	_tmp0_ = (_all_flags != NULL) ? _vala_array_dup7 (_all_flags, _all_flags_length1) : _all_flags;
	_tmp0__length1 = _all_flags_length1;
	self->priv->all_flags = (_vala_array_free (self->priv->all_flags, self->priv->all_flags_length1, (GDestroyNotify) g_free), NULL);
	self->priv->all_flags = _tmp0_;
	self->priv->all_flags_length1 = _tmp0__length1;
	self->priv->_all_flags_size_ = self->priv->all_flags_length1;
	gtk_widget_set_visible ((GtkWidget*) self, TRUE);
	gtk_widget_set_hexpand ((GtkWidget*) self, TRUE);
	gtk_orientable_set_orientation ((GtkOrientable*) self, GTK_ORIENTATION_HORIZONTAL);
	gtk_grid_set_column_spacing ((GtkGrid*) self, 8);
	_tmp1_ = (GtkMenuButton*) gtk_menu_button_new ();
	g_object_ref_sink (_tmp1_);
	button = _tmp1_;
	gtk_widget_set_visible ((GtkWidget*) button, TRUE);
	gtk_menu_button_set_use_popover (button, TRUE);
	gtk_widget_set_halign ((GtkWidget*) button, GTK_ALIGN_START);
	_tmp2_ = gtk_widget_get_style_context ((GtkWidget*) button);
	gtk_style_context_add_class (_tmp2_, "image-button");
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) button);
	_tmp3_ = self->priv->label;
	gtk_widget_set_visible ((GtkWidget*) _tmp3_, TRUE);
	_tmp4_ = self->priv->label;
	gtk_widget_set_halign ((GtkWidget*) _tmp4_, GTK_ALIGN_START);
	_tmp5_ = self->priv->label;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp5_, TRUE);
	_tmp6_ = self->priv->label;
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp6_);
	_tmp7_ = self->priv->popover;
	_tmp9_ = g_variant_get_strv (initial_value, &_tmp8_);
	_tmp10_ = _tmp9_;
	_tmp10__length1 = _tmp8_;
	_tmp11_ = self->priv->all_flags;
	_tmp11__length1 = self->priv->all_flags_length1;
	context_popover_create_flags_list (_tmp7_, _tmp10_, (gint) _tmp8_, _tmp11_, (gint) _tmp11__length1);
	_tmp10_ = (g_free (_tmp10_), NULL);
	_tmp12_ = self->priv->popover;
	gtk_popover_set_relative_to ((GtkPopover*) _tmp12_, (GtkWidget*) button);
	_tmp13_ = self->priv->popover;
	g_signal_connect_object (_tmp13_, "value-changed", (GCallback) _key_editor_child_flags_on_popover_value_changed_context_popover_value_changed, self, 0);
	key_editor_child_reload ((KeyEditorChild*) self, initial_value);
	_tmp14_ = self->priv->popover;
	gtk_menu_button_set_popover (button, (GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, gtk_popover_get_type (), GtkPopover));
	_g_object_unref0 (button);
	return self;
}

KeyEditorChildFlags*
key_editor_child_flags_new (GVariant* initial_value,
                            gchar** _all_flags,
                            gint _all_flags_length1)
{
	return key_editor_child_flags_construct (TYPE_KEY_EDITOR_CHILD_FLAGS, initial_value, _all_flags, _all_flags_length1);
}

static void
key_editor_child_flags_on_popover_value_changed (KeyEditorChildFlags* self,
                                                 GtkPopover* _popover,
                                                 GVariant* gvariant)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (_popover != NULL);
	_vala_return_if_fail (gvariant != NULL, "gvariant != null");
	key_editor_child_reload ((KeyEditorChild*) self, (GVariant*) gvariant);
	g_signal_emit ((KeyEditorChild*) self, key_editor_child_signals[KEY_EDITOR_CHILD_VALUE_HAS_CHANGED_SIGNAL], 0, TRUE);
}

static gboolean
_vala_string_array_contains (gchar* * stack,
                             gssize stack_length,
                             const gchar* needle)
{
	gssize i;
	for (i = 0; i < stack_length; i++) {
		if (g_strcmp0 (stack[i], needle) == 0) {
			return TRUE;
		}
	}
	return FALSE;
}

void
key_editor_child_flags_update_flags (KeyEditorChildFlags* self,
                                     gchar** active_flags,
                                     gint active_flags_length1)
{
	gchar** _tmp0_;
	gint _tmp0__length1;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->all_flags;
	_tmp0__length1 = self->priv->all_flags_length1;
	{
		gchar** flag_collection = NULL;
		gint flag_collection_length1 = 0;
		gint _flag_collection_size_ = 0;
		gint flag_it = 0;
		flag_collection = _tmp0_;
		flag_collection_length1 = _tmp0__length1;
		for (flag_it = 0; flag_it < flag_collection_length1; flag_it = flag_it + 1) {
			gchar* _tmp1_;
			gchar* flag = NULL;
			_tmp1_ = g_strdup (flag_collection[flag_it]);
			flag = _tmp1_;
			{
				ContextPopover* _tmp2_;
				const gchar* _tmp3_;
				const gchar* _tmp4_;
				_tmp2_ = self->priv->popover;
				_tmp3_ = flag;
				_tmp4_ = flag;
				context_popover_update_flag_status (_tmp2_, _tmp3_, _vala_string_array_contains (active_flags, active_flags_length1, _tmp4_));
				_g_free0 (flag);
			}
		}
	}
}

static GVariant*
key_editor_child_flags_real_get_variant (KeyEditorChild* base)
{
	KeyEditorChildFlags * self;
	GVariant* _tmp0_;
	GVariant* _tmp1_;
	GVariant* result;
	self = (KeyEditorChildFlags*) base;
	_tmp0_ = self->priv->variant;
	_tmp1_ = _g_variant_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}

static void
key_editor_child_flags_real_reload (KeyEditorChild* base,
                                    GVariant* gvariant)
{
	KeyEditorChildFlags * self;
	GVariant* _tmp0_;
	GtkLabel* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	self = (KeyEditorChildFlags*) base;
	g_return_if_fail (gvariant != NULL);
	_tmp0_ = _g_variant_ref0 (gvariant);
	_g_variant_unref0 (self->priv->variant);
	self->priv->variant = _tmp0_;
	_tmp1_ = self->priv->label;
	_tmp2_ = g_variant_print (gvariant, FALSE);
	_tmp3_ = _tmp2_;
	gtk_label_set_label (_tmp1_, _tmp3_);
	_g_free0 (_tmp3_);
}

static void
key_editor_child_flags_class_init (KeyEditorChildFlagsClass * klass,
                                   gpointer klass_data)
{
	key_editor_child_flags_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &KeyEditorChildFlags_private_offset);
	G_OBJECT_CLASS (klass)->finalize = key_editor_child_flags_finalize;
}

static void
key_editor_child_flags_key_editor_child_interface_init (KeyEditorChildIface * iface,
                                                        gpointer iface_data)
{
	key_editor_child_flags_key_editor_child_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_variant = (GVariant* (*) (KeyEditorChild*)) key_editor_child_flags_real_get_variant;
	iface->reload = (void (*) (KeyEditorChild*, GVariant*)) key_editor_child_flags_real_reload;
}

static void
key_editor_child_flags_instance_init (KeyEditorChildFlags * self,
                                      gpointer klass)
{
	ContextPopover* _tmp0_;
	GtkLabel* _tmp1_;
	self->priv = key_editor_child_flags_get_instance_private (self);
	_tmp0_ = context_popover_new ();
	g_object_ref_sink (_tmp0_);
	self->priv->popover = _tmp0_;
	_tmp1_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp1_);
	self->priv->label = _tmp1_;
}

static void
key_editor_child_flags_finalize (GObject * obj)
{
	KeyEditorChildFlags * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_KEY_EDITOR_CHILD_FLAGS, KeyEditorChildFlags);
	self->priv->all_flags = (_vala_array_free (self->priv->all_flags, self->priv->all_flags_length1, (GDestroyNotify) g_free), NULL);
	_g_object_unref0 (self->priv->popover);
	_g_variant_unref0 (self->priv->variant);
	_g_object_unref0 (self->priv->label);
	G_OBJECT_CLASS (key_editor_child_flags_parent_class)->finalize (obj);
}

static GType
key_editor_child_flags_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (KeyEditorChildFlagsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) key_editor_child_flags_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (KeyEditorChildFlags), 0, (GInstanceInitFunc) key_editor_child_flags_instance_init, NULL };
	static const GInterfaceInfo key_editor_child_info = { (GInterfaceInitFunc) key_editor_child_flags_key_editor_child_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType key_editor_child_flags_type_id;
	key_editor_child_flags_type_id = g_type_register_static (gtk_grid_get_type (), "KeyEditorChildFlags", &g_define_type_info, 0);
	g_type_add_interface_static (key_editor_child_flags_type_id, TYPE_KEY_EDITOR_CHILD, &key_editor_child_info);
	KeyEditorChildFlags_private_offset = g_type_add_instance_private (key_editor_child_flags_type_id, sizeof (KeyEditorChildFlagsPrivate));
	return key_editor_child_flags_type_id;
}

GType
key_editor_child_flags_get_type (void)
{
	static volatile gsize key_editor_child_flags_type_id__once = 0;
	if (g_once_init_enter (&key_editor_child_flags_type_id__once)) {
		GType key_editor_child_flags_type_id;
		key_editor_child_flags_type_id = key_editor_child_flags_get_type_once ();
		g_once_init_leave (&key_editor_child_flags_type_id__once, key_editor_child_flags_type_id);
	}
	return key_editor_child_flags_type_id__once;
}

static inline gpointer
key_editor_child_nullable_bool_get_instance_private (KeyEditorChildNullableBool* self)
{
	return G_STRUCT_MEMBER_P (self, KeyEditorChildNullableBool_private_offset);
}

static void
_key_editor_child_nullable_bool_on_popover_value_changed_context_popover_value_changed (ContextPopover* _sender,
                                                                                        GVariant* gvariant,
                                                                                        gpointer self)
{
	key_editor_child_nullable_bool_on_popover_value_changed ((KeyEditorChildNullableBool*) self, _sender, gvariant);
}

KeyEditorChildNullableBool*
key_editor_child_nullable_bool_construct (GType object_type,
                                          GVariant* initial_value,
                                          gboolean delay_mode,
                                          gboolean has_planned_change,
                                          gboolean has_schema)
{
	KeyEditorChildNullableBool * self = NULL;
	GVariant* meaningless_variant_or_null = NULL;
	ContextPopover* popover = NULL;
	ContextPopover* _tmp1_;
	GVariant* _tmp2_;
	GAction* _tmp3_;
	g_return_val_if_fail (initial_value != NULL, NULL);
	self = (KeyEditorChildNullableBool*) g_object_new (object_type, NULL);
	gtk_widget_set_visible ((GtkWidget*) self, TRUE);
	gtk_widget_set_hexpand ((GtkWidget*) self, TRUE);
	gtk_widget_set_halign ((GtkWidget*) self, GTK_ALIGN_START);
	gtk_menu_button_set_use_popover ((GtkMenuButton*) self, TRUE);
	g_object_set ((GtkWidget*) self, "width-request", 100, NULL);
	meaningless_variant_or_null = NULL;
	if (has_schema) {
		GVariant* _tmp0_;
		_tmp0_ = g_variant_new_boolean (TRUE);
		g_variant_ref_sink (_tmp0_);
		_g_variant_unref0 (meaningless_variant_or_null);
		meaningless_variant_or_null = _tmp0_;
	}
	_tmp1_ = context_popover_new ();
	g_object_ref_sink (_tmp1_);
	popover = _tmp1_;
	_tmp2_ = meaningless_variant_or_null;
	_tmp3_ = context_popover_create_buttons_list (popover, FALSE, delay_mode, has_planned_change, "mb", _tmp2_, initial_value);
	_g_object_unref0 (self->priv->action);
	self->priv->action = _tmp3_;
	gtk_popover_set_relative_to ((GtkPopover*) popover, (GtkWidget*) self);
	g_signal_connect_object (popover, "value-changed", (GCallback) _key_editor_child_nullable_bool_on_popover_value_changed_context_popover_value_changed, self, 0);
	key_editor_child_reload ((KeyEditorChild*) self, initial_value);
	gtk_menu_button_set_popover ((GtkMenuButton*) self, (GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (popover, gtk_popover_get_type (), GtkPopover));
	_g_object_unref0 (popover);
	_g_variant_unref0 (meaningless_variant_or_null);
	return self;
}

KeyEditorChildNullableBool*
key_editor_child_nullable_bool_new (GVariant* initial_value,
                                    gboolean delay_mode,
                                    gboolean has_planned_change,
                                    gboolean has_schema)
{
	return key_editor_child_nullable_bool_construct (TYPE_KEY_EDITOR_CHILD_NULLABLE_BOOL, initial_value, delay_mode, has_planned_change, has_schema);
}

static void
key_editor_child_nullable_bool_on_popover_value_changed (KeyEditorChildNullableBool* self,
                                                         GtkPopover* _popover,
                                                         GVariant* gvariant)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (_popover != NULL);
	_vala_return_if_fail (gvariant != NULL, "gvariant != null");
	key_editor_child_reload ((KeyEditorChild*) self, (GVariant*) gvariant);
	g_signal_emit_by_name (_popover, "closed");
	g_signal_emit ((KeyEditorChild*) self, key_editor_child_signals[KEY_EDITOR_CHILD_VALUE_HAS_CHANGED_SIGNAL], 0, TRUE);
}

static GVariant*
key_editor_child_nullable_bool_real_get_variant (KeyEditorChild* base)
{
	KeyEditorChildNullableBool * self;
	GVariant* _tmp0_;
	GVariant* _tmp1_;
	GVariant* result;
	self = (KeyEditorChildNullableBool*) base;
	_tmp0_ = self->priv->variant;
	_tmp1_ = _g_variant_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}

static void
key_editor_child_nullable_bool_real_reload (KeyEditorChild* base,
                                            GVariant* gvariant)
{
	KeyEditorChildNullableBool * self;
	GVariant* _tmp0_;
	GVariant* _tmp1_;
	GVariant* _tmp2_;
	GVariant* _tmp3_;
	GAction* _tmp10_;
	GVariantType* _tmp11_;
	GVariantType* _tmp12_;
	GVariant* _tmp13_;
	GVariant* _tmp14_;
	GVariant* _tmp15_;
	GVariant* _tmp16_;
	self = (KeyEditorChildNullableBool*) base;
	g_return_if_fail (gvariant != NULL);
	_tmp0_ = _g_variant_ref0 (gvariant);
	_g_variant_unref0 (self->priv->variant);
	self->priv->variant = _tmp0_;
	_tmp1_ = self->priv->variant;
	_tmp2_ = g_variant_get_maybe (_tmp1_);
	_g_variant_unref0 (self->priv->maybe_variant);
	self->priv->maybe_variant = _tmp2_;
	_tmp3_ = self->priv->maybe_variant;
	if (_tmp3_ == NULL) {
		gchar* _tmp4_;
		gchar* _tmp5_;
		_tmp4_ = key_cool_boolean_text_value (NULL, TRUE);
		_tmp5_ = _tmp4_;
		gtk_button_set_label ((GtkButton*) self, _tmp5_);
		_g_free0 (_tmp5_);
	} else {
		GVariant* _tmp6_;
		gboolean _tmp7_;
		gchar* _tmp8_;
		gchar* _tmp9_;
		_tmp6_ = self->priv->maybe_variant;
		_tmp7_ = g_variant_get_boolean ((GVariant*) _tmp6_);
		_tmp8_ = key_cool_boolean_text_value (&_tmp7_, TRUE);
		_tmp9_ = _tmp8_;
		gtk_button_set_label ((GtkButton*) self, _tmp9_);
		_g_free0 (_tmp9_);
	}
	_tmp10_ = self->priv->action;
	_tmp11_ = g_variant_type_new ("mb");
	_tmp12_ = _tmp11_;
	_tmp13_ = g_variant_new_maybe (_tmp12_, gvariant);
	g_variant_ref_sink (_tmp13_);
	_tmp14_ = _tmp13_;
	_tmp15_ = g_variant_new_maybe (NULL, _tmp14_);
	g_variant_ref_sink (_tmp15_);
	_tmp16_ = _tmp15_;
	g_action_change_state (_tmp10_, _tmp16_);
	_g_variant_unref0 (_tmp16_);
	_g_variant_unref0 (_tmp14_);
	_g_variant_type_free0 (_tmp12_);
}

static void
key_editor_child_nullable_bool_class_init (KeyEditorChildNullableBoolClass * klass,
                                           gpointer klass_data)
{
	key_editor_child_nullable_bool_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &KeyEditorChildNullableBool_private_offset);
	G_OBJECT_CLASS (klass)->finalize = key_editor_child_nullable_bool_finalize;
}

static void
key_editor_child_nullable_bool_key_editor_child_interface_init (KeyEditorChildIface * iface,
                                                                gpointer iface_data)
{
	key_editor_child_nullable_bool_key_editor_child_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_variant = (GVariant* (*) (KeyEditorChild*)) key_editor_child_nullable_bool_real_get_variant;
	iface->reload = (void (*) (KeyEditorChild*, GVariant*)) key_editor_child_nullable_bool_real_reload;
}

static void
key_editor_child_nullable_bool_instance_init (KeyEditorChildNullableBool * self,
                                              gpointer klass)
{
	self->priv = key_editor_child_nullable_bool_get_instance_private (self);
}

static void
key_editor_child_nullable_bool_finalize (GObject * obj)
{
	KeyEditorChildNullableBool * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_KEY_EDITOR_CHILD_NULLABLE_BOOL, KeyEditorChildNullableBool);
	_g_variant_unref0 (self->priv->variant);
	_g_variant_unref0 (self->priv->maybe_variant);
	_g_object_unref0 (self->priv->action);
	G_OBJECT_CLASS (key_editor_child_nullable_bool_parent_class)->finalize (obj);
}

static GType
key_editor_child_nullable_bool_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (KeyEditorChildNullableBoolClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) key_editor_child_nullable_bool_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (KeyEditorChildNullableBool), 0, (GInstanceInitFunc) key_editor_child_nullable_bool_instance_init, NULL };
	static const GInterfaceInfo key_editor_child_info = { (GInterfaceInitFunc) key_editor_child_nullable_bool_key_editor_child_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType key_editor_child_nullable_bool_type_id;
	key_editor_child_nullable_bool_type_id = g_type_register_static (gtk_menu_button_get_type (), "KeyEditorChildNullableBool", &g_define_type_info, 0);
	g_type_add_interface_static (key_editor_child_nullable_bool_type_id, TYPE_KEY_EDITOR_CHILD, &key_editor_child_info);
	KeyEditorChildNullableBool_private_offset = g_type_add_instance_private (key_editor_child_nullable_bool_type_id, sizeof (KeyEditorChildNullableBoolPrivate));
	return key_editor_child_nullable_bool_type_id;
}

GType
key_editor_child_nullable_bool_get_type (void)
{
	static volatile gsize key_editor_child_nullable_bool_type_id__once = 0;
	if (g_once_init_enter (&key_editor_child_nullable_bool_type_id__once)) {
		GType key_editor_child_nullable_bool_type_id;
		key_editor_child_nullable_bool_type_id = key_editor_child_nullable_bool_get_type_once ();
		g_once_init_leave (&key_editor_child_nullable_bool_type_id__once, key_editor_child_nullable_bool_type_id);
	}
	return key_editor_child_nullable_bool_type_id__once;
}

static inline gpointer
key_editor_child_bool_get_instance_private (KeyEditorChildBool* self)
{
	return G_STRUCT_MEMBER_P (self, KeyEditorChildBool_private_offset);
}

static void
__lambda57_ (KeyEditorChildBool* self)
{
	g_signal_emit ((KeyEditorChild*) self, key_editor_child_signals[KEY_EDITOR_CHILD_VALUE_HAS_CHANGED_SIGNAL], 0, TRUE);
}

static void
___lambda57__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                        gpointer self)
{
	__lambda57_ ((KeyEditorChildBool*) self);
}

KeyEditorChildBool*
key_editor_child_bool_construct (GType object_type,
                                 gboolean initial_value)
{
	KeyEditorChildBool * self = NULL;
	GtkStyleContext* _tmp0_;
	GtkToggleButton* button_false = NULL;
	GtkToggleButton* _tmp1_;
	gboolean _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	GtkToggleButton* _tmp5_;
	GtkToggleButton* _tmp6_;
	GtkToggleButton* _tmp7_;
	gboolean _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	GtkToggleButton* _tmp11_;
	GtkToggleButton* _tmp12_;
	GtkToggleButton* _tmp13_;
	GtkToggleButton* _tmp14_;
	self = (KeyEditorChildBool*) g_object_new (object_type, NULL);
	gtk_widget_set_visible ((GtkWidget*) self, TRUE);
	gtk_widget_set_hexpand ((GtkWidget*) self, TRUE);
	gtk_orientable_set_orientation ((GtkOrientable*) self, GTK_ORIENTATION_HORIZONTAL);
	gtk_widget_set_halign ((GtkWidget*) self, GTK_ALIGN_START);
	gtk_box_set_homogeneous ((GtkBox*) self, TRUE);
	g_object_set ((GtkWidget*) self, "width-request", 100, NULL);
	_tmp0_ = gtk_widget_get_style_context ((GtkWidget*) self);
	gtk_style_context_add_class (_tmp0_, "linked");
	_tmp1_ = (GtkToggleButton*) gtk_toggle_button_new ();
	g_object_ref_sink (_tmp1_);
	button_false = _tmp1_;
	gtk_widget_set_visible ((GtkWidget*) button_false, TRUE);
	_tmp2_ = FALSE;
	_tmp3_ = key_cool_boolean_text_value (&_tmp2_, TRUE);
	_tmp4_ = _tmp3_;
	gtk_button_set_label ((GtkButton*) button_false, _tmp4_);
	_g_free0 (_tmp4_);
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) button_false);
	_tmp5_ = (GtkToggleButton*) gtk_toggle_button_new ();
	g_object_ref_sink (_tmp5_);
	_g_object_unref0 (self->priv->button_true);
	self->priv->button_true = _tmp5_;
	_tmp6_ = self->priv->button_true;
	gtk_widget_set_visible ((GtkWidget*) _tmp6_, TRUE);
	_tmp7_ = self->priv->button_true;
	_tmp8_ = TRUE;
	_tmp9_ = key_cool_boolean_text_value (&_tmp8_, TRUE);
	_tmp10_ = _tmp9_;
	gtk_button_set_label ((GtkButton*) _tmp7_, _tmp10_);
	_g_free0 (_tmp10_);
	_tmp11_ = self->priv->button_true;
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp11_);
	_tmp12_ = self->priv->button_true;
	gtk_toggle_button_set_active (_tmp12_, initial_value);
	_tmp13_ = self->priv->button_true;
	g_object_bind_property_with_closures ((GObject*) _tmp13_, "active", (GObject*) button_false, "active", (G_BINDING_INVERT_BOOLEAN | G_BINDING_SYNC_CREATE) | G_BINDING_BIDIRECTIONAL, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp14_ = self->priv->button_true;
	g_signal_connect_object (_tmp14_, "toggled", (GCallback) ___lambda57__gtk_toggle_button_toggled, self, 0);
	_g_object_unref0 (button_false);
	return self;
}

KeyEditorChildBool*
key_editor_child_bool_new (gboolean initial_value)
{
	return key_editor_child_bool_construct (TYPE_KEY_EDITOR_CHILD_BOOL, initial_value);
}

static GVariant*
key_editor_child_bool_real_get_variant (KeyEditorChild* base)
{
	KeyEditorChildBool * self;
	GtkToggleButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	GVariant* _tmp3_;
	GVariant* result;
	self = (KeyEditorChildBool*) base;
	_tmp0_ = self->priv->button_true;
	_tmp1_ = gtk_toggle_button_get_active (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_variant_new_boolean (_tmp2_);
	g_variant_ref_sink (_tmp3_);
	result = _tmp3_;
	return result;
}

static void
key_editor_child_bool_real_reload (KeyEditorChild* base,
                                   GVariant* gvariant)
{
	KeyEditorChildBool * self;
	GtkToggleButton* _tmp0_;
	self = (KeyEditorChildBool*) base;
	g_return_if_fail (gvariant != NULL);
	_tmp0_ = self->priv->button_true;
	gtk_toggle_button_set_active (_tmp0_, g_variant_get_boolean (gvariant));
}

static void
key_editor_child_bool_class_init (KeyEditorChildBoolClass * klass,
                                  gpointer klass_data)
{
	key_editor_child_bool_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &KeyEditorChildBool_private_offset);
	G_OBJECT_CLASS (klass)->finalize = key_editor_child_bool_finalize;
}

static void
key_editor_child_bool_key_editor_child_interface_init (KeyEditorChildIface * iface,
                                                       gpointer iface_data)
{
	key_editor_child_bool_key_editor_child_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_variant = (GVariant* (*) (KeyEditorChild*)) key_editor_child_bool_real_get_variant;
	iface->reload = (void (*) (KeyEditorChild*, GVariant*)) key_editor_child_bool_real_reload;
}

static void
key_editor_child_bool_instance_init (KeyEditorChildBool * self,
                                     gpointer klass)
{
	self->priv = key_editor_child_bool_get_instance_private (self);
}

static void
key_editor_child_bool_finalize (GObject * obj)
{
	KeyEditorChildBool * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_KEY_EDITOR_CHILD_BOOL, KeyEditorChildBool);
	_g_object_unref0 (self->priv->button_true);
	G_OBJECT_CLASS (key_editor_child_bool_parent_class)->finalize (obj);
}

static GType
key_editor_child_bool_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (KeyEditorChildBoolClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) key_editor_child_bool_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (KeyEditorChildBool), 0, (GInstanceInitFunc) key_editor_child_bool_instance_init, NULL };
	static const GInterfaceInfo key_editor_child_info = { (GInterfaceInitFunc) key_editor_child_bool_key_editor_child_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType key_editor_child_bool_type_id;
	key_editor_child_bool_type_id = g_type_register_static (gtk_box_get_type (), "KeyEditorChildBool", &g_define_type_info, 0);
	g_type_add_interface_static (key_editor_child_bool_type_id, TYPE_KEY_EDITOR_CHILD, &key_editor_child_info);
	KeyEditorChildBool_private_offset = g_type_add_instance_private (key_editor_child_bool_type_id, sizeof (KeyEditorChildBoolPrivate));
	return key_editor_child_bool_type_id;
}

GType
key_editor_child_bool_get_type (void)
{
	static volatile gsize key_editor_child_bool_type_id__once = 0;
	if (g_once_init_enter (&key_editor_child_bool_type_id__once)) {
		GType key_editor_child_bool_type_id;
		key_editor_child_bool_type_id = key_editor_child_bool_get_type_once ();
		g_once_init_leave (&key_editor_child_bool_type_id__once, key_editor_child_bool_type_id);
	}
	return key_editor_child_bool_type_id__once;
}

static inline gpointer
key_editor_child_number_custom_get_instance_private (KeyEditorChildNumberCustom* self)
{
	return G_STRUCT_MEMBER_P (self, KeyEditorChildNumberCustom_private_offset);
}

static Block10Data*
block10_data_ref (Block10Data* _data10_)
{
	g_atomic_int_inc (&_data10_->_ref_count_);
	return _data10_;
}

static void
block10_data_unref (void * _userdata_)
{
	Block10Data* _data10_;
	_data10_ = (Block10Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data10_->_ref_count_)) {
		KeyEditorChildNumberCustom* self;
		self = _data10_->self;
		_g_object_unref0 (_data10_->ref_buffer);
		_g_object_unref0 (self);
		g_slice_free (Block10Data, _data10_);
	}
}

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

static void
__lambda62_ (KeyEditorChildNumberCustom* self)
{
	g_signal_emit ((KeyEditorChild*) self, key_editor_child_signals[KEY_EDITOR_CHILD_VALUE_HAS_CHANGED_SIGNAL], 0, key_editor_child_number_custom_test_value (self));
}

static void
___lambda62__gtk_entry_buffer_deleted_text (GtkEntryBuffer* _sender,
                                            guint position,
                                            guint n_chars,
                                            gpointer self)
{
	__lambda62_ ((KeyEditorChildNumberCustom*) self);
}

static void
__lambda63_ (KeyEditorChildNumberCustom* self)
{
	g_signal_emit ((KeyEditorChild*) self, key_editor_child_signals[KEY_EDITOR_CHILD_VALUE_HAS_CHANGED_SIGNAL], 0, key_editor_child_number_custom_test_value (self));
}

static void
___lambda63__gtk_entry_buffer_inserted_text (GtkEntryBuffer* _sender,
                                             guint position,
                                             const gchar* chars,
                                             guint n_chars,
                                             gpointer self)
{
	__lambda63_ ((KeyEditorChildNumberCustom*) self);
}

static void
__lambda64_ (KeyEditorChildNumberCustom* self)
{
	if (key_editor_child_number_custom_test_value (self)) {
		g_signal_emit ((KeyEditorChild*) self, key_editor_child_signals[KEY_EDITOR_CHILD_CHILD_ACTIVATED_SIGNAL], 0);
	}
}

static void
___lambda64__gtk_entry_activate (GtkEntry* _sender,
                                 gpointer self)
{
	__lambda64_ ((KeyEditorChildNumberCustom*) self);
}

static void
_key_editor_child_number_custom_set_error_class_g_object_notify (GObject* _sender,
                                                                 GParamSpec* pspec,
                                                                 gpointer self)
{
	key_editor_child_number_custom_set_error_class ((KeyEditorChildNumberCustom*) self);
}

static void
__lambda65_ (Block10Data* _data10_)
{
	KeyEditorChildNumberCustom* self;
	self = _data10_->self;
	g_signal_handler_disconnect ((GObject*) _data10_->ref_buffer, self->deleted_text_handler);
	g_signal_handler_disconnect ((GObject*) _data10_->ref_buffer, self->inserted_text_handler);
	g_signal_handler_disconnect ((GObject*) self, _data10_->entry_activated_handler);
	g_signal_handler_disconnect ((GObject*) self, _data10_->entry_sensitive_handler);
}

static void
___lambda65__gtk_widget_destroy (GtkWidget* _sender,
                                 gpointer self)
{
	__lambda65_ (self);
}

void
key_editor_child_number_custom_connect_entry (KeyEditorChildNumberCustom* self)
{
	Block10Data* _data10_;
	GtkEntryBuffer* _tmp0_;
	GtkEntryBuffer* _tmp1_;
	GtkEntryBuffer* _tmp2_;
	gulong _tmp3_;
	gulong _tmp4_;
	gulong _tmp5_;
	gulong _tmp6_;
	g_return_if_fail (self != NULL);
	_data10_ = g_slice_new0 (Block10Data);
	_data10_->_ref_count_ = 1;
	_data10_->self = g_object_ref (self);
	_tmp0_ = gtk_entry_get_buffer ((GtkEntry*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_data10_->ref_buffer = _tmp2_;
	_tmp3_ = g_signal_connect_object (_data10_->ref_buffer, "deleted-text", (GCallback) ___lambda62__gtk_entry_buffer_deleted_text, self, 0);
	self->deleted_text_handler = _tmp3_;
	_tmp4_ = g_signal_connect_object (_data10_->ref_buffer, "inserted-text", (GCallback) ___lambda63__gtk_entry_buffer_inserted_text, self, 0);
	self->inserted_text_handler = _tmp4_;
	_tmp5_ = g_signal_connect_object ((GtkEntry*) self, "activate", (GCallback) ___lambda64__gtk_entry_activate, self, 0);
	_data10_->entry_activated_handler = _tmp5_;
	_tmp6_ = g_signal_connect_object ((GObject*) self, "notify::sensitive", (GCallback) _key_editor_child_number_custom_set_error_class_g_object_notify, self, 0);
	_data10_->entry_sensitive_handler = _tmp6_;
	g_signal_connect_data ((GtkWidget*) self, "destroy", (GCallback) ___lambda65__gtk_widget_destroy, block10_data_ref (_data10_), (GClosureNotify) block10_data_unref, 0);
	block10_data_unref (_data10_);
	_data10_ = NULL;
}

static void
key_editor_child_number_custom_set_error_class (KeyEditorChildNumberCustom* self)
{
	GtkStyleContext* context = NULL;
	GtkStyleContext* _tmp0_;
	GtkStyleContext* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_widget_get_style_context ((GtkWidget*) self);
	_tmp1_ = _g_object_ref0 (_tmp0_);
	context = _tmp1_;
	if (self->priv->value_has_error) {
		if (gtk_widget_is_sensitive ((GtkWidget*) self)) {
			GtkStyleContext* _tmp2_;
			_tmp2_ = context;
			if (!gtk_style_context_has_class (_tmp2_, "error")) {
				GtkStyleContext* _tmp3_;
				_tmp3_ = context;
				gtk_style_context_add_class (_tmp3_, "error");
			}
		} else {
			GtkStyleContext* _tmp4_;
			_tmp4_ = context;
			if (gtk_style_context_has_class (_tmp4_, "error")) {
				GtkStyleContext* _tmp5_;
				_tmp5_ = context;
				gtk_style_context_remove_class (_tmp5_, "error");
			}
		}
	} else {
		gboolean _tmp6_ = FALSE;
		if (gtk_widget_is_sensitive ((GtkWidget*) self)) {
			GtkStyleContext* _tmp7_;
			_tmp7_ = context;
			_tmp6_ = gtk_style_context_has_class (_tmp7_, "error");
		} else {
			_tmp6_ = FALSE;
		}
		if (_tmp6_) {
			GtkStyleContext* _tmp8_;
			_tmp8_ = context;
			gtk_style_context_remove_class (_tmp8_, "error");
		}
	}
	_g_object_unref0 (context);
}

void
key_editor_child_number_custom_show_error (KeyEditorChildNumberCustom* self,
                                           gboolean show)
{
	g_return_if_fail (self != NULL);
	self->priv->value_has_error = show;
	if (show) {
		g_object_set ((GtkEntry*) self, "secondary-icon-name", "dialog-error-symbolic", NULL);
	} else {
		gtk_entry_set_icon_from_icon_name ((GtkEntry*) self, GTK_ENTRY_ICON_SECONDARY, NULL);
	}
	key_editor_child_number_custom_set_error_class (self);
}

static GVariant*
key_editor_child_number_custom_real_get_variant (KeyEditorChild* base)
{
	KeyEditorChildNumberCustom * self;
	GVariant* _tmp0_;
	GVariant* _tmp1_;
	GVariant* result;
	self = (KeyEditorChildNumberCustom*) base;
	_tmp0_ = self->variant;
	_tmp1_ = _g_variant_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}

static void
key_editor_child_number_custom_real_reload (KeyEditorChild* base,
                                            GVariant* gvariant)
{
	KeyEditorChildNumberCustom * self;
	GtkEntryBuffer* _tmp0_;
	GtkEntryBuffer* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	GtkEntryBuffer* _tmp4_;
	GtkEntryBuffer* _tmp5_;
	self = (KeyEditorChildNumberCustom*) base;
	g_return_if_fail (gvariant != NULL);
	_tmp0_ = gtk_entry_get_buffer ((GtkEntry*) self);
	_tmp1_ = _tmp0_;
	key_editor_child_set_lock_on ((GObject*) _tmp1_, self->deleted_text_handler, self->inserted_text_handler);
	_tmp2_ = g_variant_print (gvariant, FALSE);
	_tmp3_ = _tmp2_;
	gtk_entry_set_text ((GtkEntry*) self, _tmp3_);
	_g_free0 (_tmp3_);
	if (!key_editor_child_number_custom_test_value (self)) {
		g_assert_not_reached ();
	}
	_tmp4_ = gtk_entry_get_buffer ((GtkEntry*) self);
	_tmp5_ = _tmp4_;
	key_editor_child_set_lock_off ((GObject*) _tmp5_, self->deleted_text_handler, self->inserted_text_handler);
}

static gboolean
key_editor_child_number_custom_real_test_value (KeyEditorChildNumberCustom* self)
{
	gboolean _tmp0_ = FALSE;
	g_critical ("Type `%s' does not implement abstract method `key_editor_child_number_custom_test_value'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return _tmp0_;
}

gboolean
key_editor_child_number_custom_test_value (KeyEditorChildNumberCustom* self)
{
	KeyEditorChildNumberCustomClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = KEY_EDITOR_CHILD_NUMBER_CUSTOM_GET_CLASS (self);
	if (_klass_->test_value) {
		return _klass_->test_value (self);
	}
	return FALSE;
}

KeyEditorChildNumberCustom*
key_editor_child_number_custom_construct (GType object_type)
{
	KeyEditorChildNumberCustom * self = NULL;
	self = (KeyEditorChildNumberCustom*) g_object_new (object_type, NULL);
	return self;
}

static GObject *
key_editor_child_number_custom_constructor (GType type,
                                            guint n_construct_properties,
                                            GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	KeyEditorChildNumberCustom * self;
	GtkStyleContext* _tmp0_;
	parent_class = G_OBJECT_CLASS (key_editor_child_number_custom_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_KEY_EDITOR_CHILD_NUMBER_CUSTOM, KeyEditorChildNumberCustom);
	_tmp0_ = gtk_widget_get_style_context ((GtkWidget*) self);
	gtk_style_context_add_class (_tmp0_, "key-editor-child-entry");
	return obj;
}

static void
key_editor_child_number_custom_class_init (KeyEditorChildNumberCustomClass * klass,
                                           gpointer klass_data)
{
	key_editor_child_number_custom_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &KeyEditorChildNumberCustom_private_offset);
	((KeyEditorChildNumberCustomClass *) klass)->test_value = (gboolean (*) (KeyEditorChildNumberCustom*)) key_editor_child_number_custom_real_test_value;
	G_OBJECT_CLASS (klass)->constructor = key_editor_child_number_custom_constructor;
	G_OBJECT_CLASS (klass)->finalize = key_editor_child_number_custom_finalize;
}

static void
key_editor_child_number_custom_key_editor_child_interface_init (KeyEditorChildIface * iface,
                                                                gpointer iface_data)
{
	key_editor_child_number_custom_key_editor_child_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_variant = (GVariant* (*) (KeyEditorChild*)) key_editor_child_number_custom_real_get_variant;
	iface->reload = (void (*) (KeyEditorChild*, GVariant*)) key_editor_child_number_custom_real_reload;
}

static void
key_editor_child_number_custom_instance_init (KeyEditorChildNumberCustom * self,
                                              gpointer klass)
{
	self->priv = key_editor_child_number_custom_get_instance_private (self);
	self->deleted_text_handler = (gulong) 0;
	self->inserted_text_handler = (gulong) 0;
	self->priv->value_has_error = FALSE;
}

static void
key_editor_child_number_custom_finalize (GObject * obj)
{
	KeyEditorChildNumberCustom * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_KEY_EDITOR_CHILD_NUMBER_CUSTOM, KeyEditorChildNumberCustom);
	_g_variant_unref0 (self->variant);
	G_OBJECT_CLASS (key_editor_child_number_custom_parent_class)->finalize (obj);
}

static GType
key_editor_child_number_custom_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (KeyEditorChildNumberCustomClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) key_editor_child_number_custom_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (KeyEditorChildNumberCustom), 0, (GInstanceInitFunc) key_editor_child_number_custom_instance_init, NULL };
	static const GInterfaceInfo key_editor_child_info = { (GInterfaceInitFunc) key_editor_child_number_custom_key_editor_child_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType key_editor_child_number_custom_type_id;
	key_editor_child_number_custom_type_id = g_type_register_static (gtk_entry_get_type (), "KeyEditorChildNumberCustom", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
	g_type_add_interface_static (key_editor_child_number_custom_type_id, TYPE_KEY_EDITOR_CHILD, &key_editor_child_info);
	KeyEditorChildNumberCustom_private_offset = g_type_add_instance_private (key_editor_child_number_custom_type_id, sizeof (KeyEditorChildNumberCustomPrivate));
	return key_editor_child_number_custom_type_id;
}

GType
key_editor_child_number_custom_get_type (void)
{
	static volatile gsize key_editor_child_number_custom_type_id__once = 0;
	if (g_once_init_enter (&key_editor_child_number_custom_type_id__once)) {
		GType key_editor_child_number_custom_type_id;
		key_editor_child_number_custom_type_id = key_editor_child_number_custom_get_type_once ();
		g_once_init_leave (&key_editor_child_number_custom_type_id__once, key_editor_child_number_custom_type_id);
	}
	return key_editor_child_number_custom_type_id__once;
}

static inline gpointer
key_editor_child_number_double_get_instance_private (KeyEditorChildNumberDouble* self)
{
	return G_STRUCT_MEMBER_P (self, KeyEditorChildNumberDouble_private_offset);
}

KeyEditorChildNumberDouble*
key_editor_child_number_double_construct (GType object_type,
                                          GVariant* initial_value,
                                          GVariant* range_content_or_null)
{
	KeyEditorChildNumberDouble * self = NULL;
	GVariant* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	g_return_val_if_fail (initial_value != NULL, NULL);
	self = (KeyEditorChildNumberDouble*) key_editor_child_number_custom_construct (object_type);
	_tmp0_ = _g_variant_ref0 (initial_value);
	_g_variant_unref0 (((KeyEditorChildNumberCustom*) self)->variant);
	((KeyEditorChildNumberCustom*) self)->variant = _tmp0_;
	gtk_widget_set_visible ((GtkWidget*) self, TRUE);
	gtk_widget_set_hexpand ((GtkWidget*) self, TRUE);
	g_object_set ((GtkEntry*) self, "secondary-icon-activatable", FALSE, NULL);
	_tmp1_ = g_variant_print (initial_value, FALSE);
	_tmp2_ = _tmp1_;
	gtk_entry_set_text ((GtkEntry*) self, _tmp2_);
	_g_free0 (_tmp2_);
	if (range_content_or_null != NULL) {
		GVariant* _tmp3_;
		GVariant* _tmp4_;
		GVariant* _tmp5_;
		GVariant* _tmp6_;
		_tmp3_ = g_variant_get_child_value ((GVariant*) range_content_or_null, (gsize) 0);
		_tmp4_ = _tmp3_;
		self->priv->min = g_variant_get_double (_tmp4_);
		_g_variant_unref0 (_tmp4_);
		_tmp5_ = g_variant_get_child_value ((GVariant*) range_content_or_null, (gsize) 1);
		_tmp6_ = _tmp5_;
		self->priv->max = g_variant_get_double (_tmp6_);
		_g_variant_unref0 (_tmp6_);
	} else {
		self->priv->min = -DBL_MAX;
		self->priv->max = DBL_MAX;
	}
	key_editor_child_number_custom_connect_entry ((KeyEditorChildNumberCustom*) self);
	return self;
}

KeyEditorChildNumberDouble*
key_editor_child_number_double_new (GVariant* initial_value,
                                    GVariant* range_content_or_null)
{
	return key_editor_child_number_double_construct (TYPE_KEY_EDITOR_CHILD_NUMBER_DOUBLE, initial_value, range_content_or_null);
}

static void
key_editor_child_number_double_switch_icon_tooltip_text (KeyEditorChildNumberDouble* self,
                                                         gboolean range_error)
{
	g_return_if_fail (self != NULL);
	if (range_error) {
		gtk_entry_set_icon_tooltip_text ((GtkEntry*) self, GTK_ENTRY_ICON_SECONDARY, KEY_EDITOR_CHILD_out_of_range_text);
	} else {
		gtk_entry_set_icon_tooltip_text ((GtkEntry*) self, GTK_ENTRY_ICON_SECONDARY, _ ("Failed to parse as double."));
	}
}

static gboolean
key_editor_child_number_double_real_test_value (KeyEditorChildNumberCustom* base)
{
	KeyEditorChildNumberDouble * self;
	GVariant* tmp_variant = NULL;
	gchar* tmp_text = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gdouble variant_value = 0.0;
	GVariant* _tmp10_;
	gboolean _tmp11_ = FALSE;
	GError* _inner_error0_ = NULL;
	gboolean result;
	self = (KeyEditorChildNumberDouble*) base;
	_tmp0_ = gtk_entry_get_text ((GtkEntry*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strdup (_tmp1_);
	tmp_text = _tmp2_;
	{
		GVariant* _tmp3_ = NULL;
		const GVariantType* _tmp4_;
		const gchar* _tmp5_;
		GVariant* _tmp6_;
		GVariant* _tmp8_;
		_tmp4_ = G_VARIANT_TYPE_DOUBLE;
		_tmp5_ = tmp_text;
		_tmp6_ = g_variant_parse (_tmp4_, _tmp5_, NULL, NULL, &_inner_error0_);
		_tmp3_ = _tmp6_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp7_ = FALSE;
			if (_inner_error0_->domain == G_VARIANT_PARSE_ERROR) {
				goto __catch0_g_variant_parse_error;
			}
			_g_free0 (tmp_text);
			_g_variant_unref0 (tmp_variant);
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return _tmp7_;
		}
		_tmp8_ = _tmp3_;
		_tmp3_ = NULL;
		_g_variant_unref0 (tmp_variant);
		tmp_variant = _tmp8_;
		_g_variant_unref0 (_tmp3_);
	}
	goto __finally0;
	__catch0_g_variant_parse_error:
	{
		g_clear_error (&_inner_error0_);
		key_editor_child_number_double_switch_icon_tooltip_text (self, FALSE);
		key_editor_child_number_custom_show_error ((KeyEditorChildNumberCustom*) self, TRUE);
		result = FALSE;
		_g_free0 (tmp_text);
		_g_variant_unref0 (tmp_variant);
		return result;
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gboolean _tmp9_ = FALSE;
		_g_free0 (tmp_text);
		_g_variant_unref0 (tmp_variant);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return _tmp9_;
	}
	_tmp10_ = tmp_variant;
	variant_value = g_variant_get_double ((GVariant*) _tmp10_);
	if (variant_value < self->priv->min) {
		_tmp11_ = TRUE;
	} else {
		_tmp11_ = variant_value > self->priv->max;
	}
	if (_tmp11_) {
		key_editor_child_number_double_switch_icon_tooltip_text (self, TRUE);
		key_editor_child_number_custom_show_error ((KeyEditorChildNumberCustom*) self, TRUE);
		result = FALSE;
		_g_free0 (tmp_text);
		_g_variant_unref0 (tmp_variant);
		return result;
	} else {
		GVariant* _tmp12_;
		GVariant* _tmp13_;
		_tmp12_ = tmp_variant;
		_tmp13_ = _g_variant_ref0 ((GVariant*) _tmp12_);
		_g_variant_unref0 (((KeyEditorChildNumberCustom*) self)->variant);
		((KeyEditorChildNumberCustom*) self)->variant = _tmp13_;
		key_editor_child_number_custom_show_error ((KeyEditorChildNumberCustom*) self, FALSE);
		result = TRUE;
		_g_free0 (tmp_text);
		_g_variant_unref0 (tmp_variant);
		return result;
	}
}

static void
key_editor_child_number_double_class_init (KeyEditorChildNumberDoubleClass * klass,
                                           gpointer klass_data)
{
	key_editor_child_number_double_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &KeyEditorChildNumberDouble_private_offset);
	((KeyEditorChildNumberCustomClass *) klass)->test_value = (gboolean (*) (KeyEditorChildNumberCustom*)) key_editor_child_number_double_real_test_value;
	G_OBJECT_CLASS (klass)->finalize = key_editor_child_number_double_finalize;
}

static void
key_editor_child_number_double_instance_init (KeyEditorChildNumberDouble * self,
                                              gpointer klass)
{
	self->priv = key_editor_child_number_double_get_instance_private (self);
}

static void
key_editor_child_number_double_finalize (GObject * obj)
{
	KeyEditorChildNumberDouble * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_KEY_EDITOR_CHILD_NUMBER_DOUBLE, KeyEditorChildNumberDouble);
	G_OBJECT_CLASS (key_editor_child_number_double_parent_class)->finalize (obj);
}

static GType
key_editor_child_number_double_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (KeyEditorChildNumberDoubleClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) key_editor_child_number_double_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (KeyEditorChildNumberDouble), 0, (GInstanceInitFunc) key_editor_child_number_double_instance_init, NULL };
	GType key_editor_child_number_double_type_id;
	key_editor_child_number_double_type_id = g_type_register_static (TYPE_KEY_EDITOR_CHILD_NUMBER_CUSTOM, "KeyEditorChildNumberDouble", &g_define_type_info, 0);
	KeyEditorChildNumberDouble_private_offset = g_type_add_instance_private (key_editor_child_number_double_type_id, sizeof (KeyEditorChildNumberDoublePrivate));
	return key_editor_child_number_double_type_id;
}

GType
key_editor_child_number_double_get_type (void)
{
	static volatile gsize key_editor_child_number_double_type_id__once = 0;
	if (g_once_init_enter (&key_editor_child_number_double_type_id__once)) {
		GType key_editor_child_number_double_type_id;
		key_editor_child_number_double_type_id = key_editor_child_number_double_get_type_once ();
		g_once_init_leave (&key_editor_child_number_double_type_id__once, key_editor_child_number_double_type_id);
	}
	return key_editor_child_number_double_type_id__once;
}

static inline gpointer
key_editor_child_number_int64_get_instance_private (KeyEditorChildNumberInt64* self)
{
	return G_STRUCT_MEMBER_P (self, KeyEditorChildNumberInt64_private_offset);
}

KeyEditorChildNumberInt64*
key_editor_child_number_int64_construct (GType object_type,
                                         GVariant* initial_value,
                                         GVariant* range_content_or_null)
{
	KeyEditorChildNumberInt64 * self = NULL;
	GVariant* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	g_return_val_if_fail (initial_value != NULL, NULL);
	self = (KeyEditorChildNumberInt64*) key_editor_child_number_custom_construct (object_type);
	_tmp0_ = _g_variant_ref0 (initial_value);
	_g_variant_unref0 (((KeyEditorChildNumberCustom*) self)->variant);
	((KeyEditorChildNumberCustom*) self)->variant = _tmp0_;
	gtk_widget_set_visible ((GtkWidget*) self, TRUE);
	gtk_widget_set_hexpand ((GtkWidget*) self, TRUE);
	g_object_set ((GtkEntry*) self, "secondary-icon-activatable", FALSE, NULL);
	_tmp1_ = g_variant_print (initial_value, FALSE);
	_tmp2_ = _tmp1_;
	gtk_entry_set_text ((GtkEntry*) self, _tmp2_);
	_g_free0 (_tmp2_);
	if (range_content_or_null != NULL) {
		GVariant* _tmp3_;
		GVariant* _tmp4_;
		GVariant* _tmp5_;
		GVariant* _tmp6_;
		_tmp3_ = g_variant_get_child_value ((GVariant*) range_content_or_null, (gsize) 0);
		_tmp4_ = _tmp3_;
		self->priv->min = g_variant_get_int64 (_tmp4_);
		_g_variant_unref0 (_tmp4_);
		_tmp5_ = g_variant_get_child_value ((GVariant*) range_content_or_null, (gsize) 1);
		_tmp6_ = _tmp5_;
		self->priv->max = g_variant_get_int64 (_tmp6_);
		_g_variant_unref0 (_tmp6_);
	} else {
		self->priv->min = G_MININT64;
		self->priv->max = G_MAXINT64;
	}
	key_editor_child_number_custom_connect_entry ((KeyEditorChildNumberCustom*) self);
	return self;
}

KeyEditorChildNumberInt64*
key_editor_child_number_int64_new (GVariant* initial_value,
                                   GVariant* range_content_or_null)
{
	return key_editor_child_number_int64_construct (TYPE_KEY_EDITOR_CHILD_NUMBER_INT64, initial_value, range_content_or_null);
}

static void
key_editor_child_number_int64_switch_icon_tooltip_text (KeyEditorChildNumberInt64* self,
                                                        gboolean range_error)
{
	g_return_if_fail (self != NULL);
	if (range_error) {
		gtk_entry_set_icon_tooltip_text ((GtkEntry*) self, GTK_ENTRY_ICON_SECONDARY, KEY_EDITOR_CHILD_out_of_range_text);
	} else {
		gtk_entry_set_icon_tooltip_text ((GtkEntry*) self, GTK_ENTRY_ICON_SECONDARY, _ ("Failed to parse as 64-bit integer."));
	}
}

static gboolean
key_editor_child_number_int64_real_test_value (KeyEditorChildNumberCustom* base)
{
	KeyEditorChildNumberInt64 * self;
	GVariant* tmp_variant = NULL;
	gchar* tmp_text = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gint64 variant_value = 0LL;
	GVariant* _tmp10_;
	gboolean _tmp11_ = FALSE;
	GError* _inner_error0_ = NULL;
	gboolean result;
	self = (KeyEditorChildNumberInt64*) base;
	_tmp0_ = gtk_entry_get_text ((GtkEntry*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strdup (_tmp1_);
	tmp_text = _tmp2_;
	{
		GVariant* _tmp3_ = NULL;
		const GVariantType* _tmp4_;
		const gchar* _tmp5_;
		GVariant* _tmp6_;
		GVariant* _tmp8_;
		_tmp4_ = G_VARIANT_TYPE_INT64;
		_tmp5_ = tmp_text;
		_tmp6_ = g_variant_parse (_tmp4_, _tmp5_, NULL, NULL, &_inner_error0_);
		_tmp3_ = _tmp6_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp7_ = FALSE;
			if (_inner_error0_->domain == G_VARIANT_PARSE_ERROR) {
				goto __catch0_g_variant_parse_error;
			}
			_g_free0 (tmp_text);
			_g_variant_unref0 (tmp_variant);
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return _tmp7_;
		}
		_tmp8_ = _tmp3_;
		_tmp3_ = NULL;
		_g_variant_unref0 (tmp_variant);
		tmp_variant = _tmp8_;
		_g_variant_unref0 (_tmp3_);
	}
	goto __finally0;
	__catch0_g_variant_parse_error:
	{
		g_clear_error (&_inner_error0_);
		key_editor_child_number_int64_switch_icon_tooltip_text (self, FALSE);
		key_editor_child_number_custom_show_error ((KeyEditorChildNumberCustom*) self, TRUE);
		result = FALSE;
		_g_free0 (tmp_text);
		_g_variant_unref0 (tmp_variant);
		return result;
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gboolean _tmp9_ = FALSE;
		_g_free0 (tmp_text);
		_g_variant_unref0 (tmp_variant);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return _tmp9_;
	}
	_tmp10_ = tmp_variant;
	variant_value = g_variant_get_int64 ((GVariant*) _tmp10_);
	if (variant_value < self->priv->min) {
		_tmp11_ = TRUE;
	} else {
		_tmp11_ = variant_value > self->priv->max;
	}
	if (_tmp11_) {
		key_editor_child_number_int64_switch_icon_tooltip_text (self, TRUE);
		key_editor_child_number_custom_show_error ((KeyEditorChildNumberCustom*) self, TRUE);
		result = FALSE;
		_g_free0 (tmp_text);
		_g_variant_unref0 (tmp_variant);
		return result;
	} else {
		GVariant* _tmp12_;
		GVariant* _tmp13_;
		_tmp12_ = tmp_variant;
		_tmp13_ = _g_variant_ref0 ((GVariant*) _tmp12_);
		_g_variant_unref0 (((KeyEditorChildNumberCustom*) self)->variant);
		((KeyEditorChildNumberCustom*) self)->variant = _tmp13_;
		key_editor_child_number_custom_show_error ((KeyEditorChildNumberCustom*) self, FALSE);
		result = TRUE;
		_g_free0 (tmp_text);
		_g_variant_unref0 (tmp_variant);
		return result;
	}
}

static void
key_editor_child_number_int64_class_init (KeyEditorChildNumberInt64Class * klass,
                                          gpointer klass_data)
{
	key_editor_child_number_int64_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &KeyEditorChildNumberInt64_private_offset);
	((KeyEditorChildNumberCustomClass *) klass)->test_value = (gboolean (*) (KeyEditorChildNumberCustom*)) key_editor_child_number_int64_real_test_value;
	G_OBJECT_CLASS (klass)->finalize = key_editor_child_number_int64_finalize;
}

static void
key_editor_child_number_int64_instance_init (KeyEditorChildNumberInt64 * self,
                                             gpointer klass)
{
	self->priv = key_editor_child_number_int64_get_instance_private (self);
}

static void
key_editor_child_number_int64_finalize (GObject * obj)
{
	KeyEditorChildNumberInt64 * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_KEY_EDITOR_CHILD_NUMBER_INT64, KeyEditorChildNumberInt64);
	G_OBJECT_CLASS (key_editor_child_number_int64_parent_class)->finalize (obj);
}

static GType
key_editor_child_number_int64_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (KeyEditorChildNumberInt64Class), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) key_editor_child_number_int64_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (KeyEditorChildNumberInt64), 0, (GInstanceInitFunc) key_editor_child_number_int64_instance_init, NULL };
	GType key_editor_child_number_int64_type_id;
	key_editor_child_number_int64_type_id = g_type_register_static (TYPE_KEY_EDITOR_CHILD_NUMBER_CUSTOM, "KeyEditorChildNumberInt64", &g_define_type_info, 0);
	KeyEditorChildNumberInt64_private_offset = g_type_add_instance_private (key_editor_child_number_int64_type_id, sizeof (KeyEditorChildNumberInt64Private));
	return key_editor_child_number_int64_type_id;
}

GType
key_editor_child_number_int64_get_type (void)
{
	static volatile gsize key_editor_child_number_int64_type_id__once = 0;
	if (g_once_init_enter (&key_editor_child_number_int64_type_id__once)) {
		GType key_editor_child_number_int64_type_id;
		key_editor_child_number_int64_type_id = key_editor_child_number_int64_get_type_once ();
		g_once_init_leave (&key_editor_child_number_int64_type_id__once, key_editor_child_number_int64_type_id);
	}
	return key_editor_child_number_int64_type_id__once;
}

static inline gpointer
key_editor_child_number_uint64_get_instance_private (KeyEditorChildNumberUint64* self)
{
	return G_STRUCT_MEMBER_P (self, KeyEditorChildNumberUint64_private_offset);
}

KeyEditorChildNumberUint64*
key_editor_child_number_uint64_construct (GType object_type,
                                          GVariant* initial_value,
                                          GVariant* range_content_or_null)
{
	KeyEditorChildNumberUint64 * self = NULL;
	GVariant* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	g_return_val_if_fail (initial_value != NULL, NULL);
	self = (KeyEditorChildNumberUint64*) key_editor_child_number_custom_construct (object_type);
	_tmp0_ = _g_variant_ref0 (initial_value);
	_g_variant_unref0 (((KeyEditorChildNumberCustom*) self)->variant);
	((KeyEditorChildNumberCustom*) self)->variant = _tmp0_;
	gtk_widget_set_visible ((GtkWidget*) self, TRUE);
	gtk_widget_set_hexpand ((GtkWidget*) self, TRUE);
	g_object_set ((GtkEntry*) self, "secondary-icon-activatable", FALSE, NULL);
	_tmp1_ = g_variant_print (initial_value, FALSE);
	_tmp2_ = _tmp1_;
	gtk_entry_set_text ((GtkEntry*) self, _tmp2_);
	_g_free0 (_tmp2_);
	if (range_content_or_null != NULL) {
		GVariant* _tmp3_;
		GVariant* _tmp4_;
		GVariant* _tmp5_;
		GVariant* _tmp6_;
		_tmp3_ = g_variant_get_child_value ((GVariant*) range_content_or_null, (gsize) 0);
		_tmp4_ = _tmp3_;
		self->priv->min = g_variant_get_uint64 (_tmp4_);
		_g_variant_unref0 (_tmp4_);
		_tmp5_ = g_variant_get_child_value ((GVariant*) range_content_or_null, (gsize) 1);
		_tmp6_ = _tmp5_;
		self->priv->max = g_variant_get_uint64 (_tmp6_);
		_g_variant_unref0 (_tmp6_);
	} else {
		self->priv->min = 0ULL;
		self->priv->max = G_MAXUINT64;
	}
	key_editor_child_number_custom_connect_entry ((KeyEditorChildNumberCustom*) self);
	return self;
}

KeyEditorChildNumberUint64*
key_editor_child_number_uint64_new (GVariant* initial_value,
                                    GVariant* range_content_or_null)
{
	return key_editor_child_number_uint64_construct (TYPE_KEY_EDITOR_CHILD_NUMBER_UINT64, initial_value, range_content_or_null);
}

static void
key_editor_child_number_uint64_switch_icon_tooltip_text (KeyEditorChildNumberUint64* self,
                                                         gboolean range_error)
{
	g_return_if_fail (self != NULL);
	if (range_error) {
		gtk_entry_set_icon_tooltip_text ((GtkEntry*) self, GTK_ENTRY_ICON_SECONDARY, KEY_EDITOR_CHILD_out_of_range_text);
	} else {
		gtk_entry_set_icon_tooltip_text ((GtkEntry*) self, GTK_ENTRY_ICON_SECONDARY, _ ("Failed to parse as unsigned 64-bit integer."));
	}
}

static gboolean
key_editor_child_number_uint64_real_test_value (KeyEditorChildNumberCustom* base)
{
	KeyEditorChildNumberUint64 * self;
	GVariant* tmp_variant = NULL;
	gchar* tmp_text = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	guint64 variant_value = 0ULL;
	GVariant* _tmp10_;
	gboolean _tmp11_ = FALSE;
	GError* _inner_error0_ = NULL;
	gboolean result;
	self = (KeyEditorChildNumberUint64*) base;
	_tmp0_ = gtk_entry_get_text ((GtkEntry*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strdup (_tmp1_);
	tmp_text = _tmp2_;
	{
		GVariant* _tmp3_ = NULL;
		const GVariantType* _tmp4_;
		const gchar* _tmp5_;
		GVariant* _tmp6_;
		GVariant* _tmp8_;
		_tmp4_ = G_VARIANT_TYPE_UINT64;
		_tmp5_ = tmp_text;
		_tmp6_ = g_variant_parse (_tmp4_, _tmp5_, NULL, NULL, &_inner_error0_);
		_tmp3_ = _tmp6_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp7_ = FALSE;
			if (_inner_error0_->domain == G_VARIANT_PARSE_ERROR) {
				goto __catch0_g_variant_parse_error;
			}
			_g_free0 (tmp_text);
			_g_variant_unref0 (tmp_variant);
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return _tmp7_;
		}
		_tmp8_ = _tmp3_;
		_tmp3_ = NULL;
		_g_variant_unref0 (tmp_variant);
		tmp_variant = _tmp8_;
		_g_variant_unref0 (_tmp3_);
	}
	goto __finally0;
	__catch0_g_variant_parse_error:
	{
		g_clear_error (&_inner_error0_);
		key_editor_child_number_uint64_switch_icon_tooltip_text (self, FALSE);
		key_editor_child_number_custom_show_error ((KeyEditorChildNumberCustom*) self, TRUE);
		result = FALSE;
		_g_free0 (tmp_text);
		_g_variant_unref0 (tmp_variant);
		return result;
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gboolean _tmp9_ = FALSE;
		_g_free0 (tmp_text);
		_g_variant_unref0 (tmp_variant);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return _tmp9_;
	}
	_tmp10_ = tmp_variant;
	variant_value = g_variant_get_uint64 ((GVariant*) _tmp10_);
	if (variant_value < self->priv->min) {
		_tmp11_ = TRUE;
	} else {
		_tmp11_ = variant_value > self->priv->max;
	}
	if (_tmp11_) {
		key_editor_child_number_uint64_switch_icon_tooltip_text (self, TRUE);
		key_editor_child_number_custom_show_error ((KeyEditorChildNumberCustom*) self, TRUE);
		result = FALSE;
		_g_free0 (tmp_text);
		_g_variant_unref0 (tmp_variant);
		return result;
	} else {
		GVariant* _tmp12_;
		GVariant* _tmp13_;
		_tmp12_ = tmp_variant;
		_tmp13_ = _g_variant_ref0 ((GVariant*) _tmp12_);
		_g_variant_unref0 (((KeyEditorChildNumberCustom*) self)->variant);
		((KeyEditorChildNumberCustom*) self)->variant = _tmp13_;
		key_editor_child_number_custom_show_error ((KeyEditorChildNumberCustom*) self, FALSE);
		result = TRUE;
		_g_free0 (tmp_text);
		_g_variant_unref0 (tmp_variant);
		return result;
	}
}

static void
key_editor_child_number_uint64_class_init (KeyEditorChildNumberUint64Class * klass,
                                           gpointer klass_data)
{
	key_editor_child_number_uint64_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &KeyEditorChildNumberUint64_private_offset);
	((KeyEditorChildNumberCustomClass *) klass)->test_value = (gboolean (*) (KeyEditorChildNumberCustom*)) key_editor_child_number_uint64_real_test_value;
	G_OBJECT_CLASS (klass)->finalize = key_editor_child_number_uint64_finalize;
}

static void
key_editor_child_number_uint64_instance_init (KeyEditorChildNumberUint64 * self,
                                              gpointer klass)
{
	self->priv = key_editor_child_number_uint64_get_instance_private (self);
}

static void
key_editor_child_number_uint64_finalize (GObject * obj)
{
	KeyEditorChildNumberUint64 * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_KEY_EDITOR_CHILD_NUMBER_UINT64, KeyEditorChildNumberUint64);
	G_OBJECT_CLASS (key_editor_child_number_uint64_parent_class)->finalize (obj);
}

static GType
key_editor_child_number_uint64_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (KeyEditorChildNumberUint64Class), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) key_editor_child_number_uint64_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (KeyEditorChildNumberUint64), 0, (GInstanceInitFunc) key_editor_child_number_uint64_instance_init, NULL };
	GType key_editor_child_number_uint64_type_id;
	key_editor_child_number_uint64_type_id = g_type_register_static (TYPE_KEY_EDITOR_CHILD_NUMBER_CUSTOM, "KeyEditorChildNumberUint64", &g_define_type_info, 0);
	KeyEditorChildNumberUint64_private_offset = g_type_add_instance_private (key_editor_child_number_uint64_type_id, sizeof (KeyEditorChildNumberUint64Private));
	return key_editor_child_number_uint64_type_id;
}

GType
key_editor_child_number_uint64_get_type (void)
{
	static volatile gsize key_editor_child_number_uint64_type_id__once = 0;
	if (g_once_init_enter (&key_editor_child_number_uint64_type_id__once)) {
		GType key_editor_child_number_uint64_type_id;
		key_editor_child_number_uint64_type_id = key_editor_child_number_uint64_get_type_once ();
		g_once_init_leave (&key_editor_child_number_uint64_type_id__once, key_editor_child_number_uint64_type_id);
	}
	return key_editor_child_number_uint64_type_id__once;
}

static inline gpointer
key_editor_child_number_int_get_instance_private (KeyEditorChildNumberInt* self)
{
	return G_STRUCT_MEMBER_P (self, KeyEditorChildNumberInt_private_offset);
}

static Block11Data*
block11_data_ref (Block11Data* _data11_)
{
	g_atomic_int_inc (&_data11_->_ref_count_);
	return _data11_;
}

static void
block11_data_unref (void * _userdata_)
{
	Block11Data* _data11_;
	_data11_ = (Block11Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data11_->_ref_count_)) {
		KeyEditorChildNumberInt* self;
		self = _data11_->self;
		_g_object_unref0 (_data11_->ref_buffer);
		_g_object_unref0 (self);
		g_slice_free (Block11Data, _data11_);
	}
}

static void
__lambda58_ (KeyEditorChildNumberInt* self)
{
	g_signal_emit ((KeyEditorChild*) self, key_editor_child_signals[KEY_EDITOR_CHILD_VALUE_HAS_CHANGED_SIGNAL], 0, key_editor_child_number_int_test_value (self));
}

static void
___lambda58__gtk_entry_buffer_deleted_text (GtkEntryBuffer* _sender,
                                            guint position,
                                            guint n_chars,
                                            gpointer self)
{
	__lambda58_ ((KeyEditorChildNumberInt*) self);
}

static void
__lambda59_ (KeyEditorChildNumberInt* self)
{
	g_signal_emit ((KeyEditorChild*) self, key_editor_child_signals[KEY_EDITOR_CHILD_VALUE_HAS_CHANGED_SIGNAL], 0, key_editor_child_number_int_test_value (self));
}

static void
___lambda59__gtk_entry_buffer_inserted_text (GtkEntryBuffer* _sender,
                                             guint position,
                                             const gchar* chars,
                                             guint n_chars,
                                             gpointer self)
{
	__lambda59_ ((KeyEditorChildNumberInt*) self);
}

static void
__lambda60_ (KeyEditorChildNumberInt* self)
{
	if (key_editor_child_number_int_test_value (self)) {
		g_signal_emit ((KeyEditorChild*) self, key_editor_child_signals[KEY_EDITOR_CHILD_CHILD_ACTIVATED_SIGNAL], 0);
	}
	gtk_spin_button_update ((GtkSpinButton*) self);
}

static void
___lambda60__gtk_entry_activate (GtkEntry* _sender,
                                 gpointer self)
{
	__lambda60_ ((KeyEditorChildNumberInt*) self);
}

static void
_key_editor_child_number_int_set_error_class_g_object_notify (GObject* _sender,
                                                              GParamSpec* pspec,
                                                              gpointer self)
{
	key_editor_child_number_int_set_error_class ((KeyEditorChildNumberInt*) self);
}

static void
__lambda61_ (Block11Data* _data11_)
{
	KeyEditorChildNumberInt* self;
	self = _data11_->self;
	g_signal_handler_disconnect ((GObject*) _data11_->ref_buffer, self->priv->deleted_text_handler);
	g_signal_handler_disconnect ((GObject*) _data11_->ref_buffer, self->priv->inserted_text_handler);
	g_signal_handler_disconnect ((GObject*) self, _data11_->entry_activated_handler);
	g_signal_handler_disconnect ((GObject*) self, _data11_->entry_sensitive_handler);
}

static void
___lambda61__gtk_widget_destroy (GtkWidget* _sender,
                                 gpointer self)
{
	__lambda61_ (self);
}

KeyEditorChildNumberInt*
key_editor_child_number_int_construct (GType object_type,
                                       GVariant* initial_value,
                                       const gchar* type_string,
                                       GVariant* range_content_or_null)
{
	KeyEditorChildNumberInt * self = NULL;
	Block11Data* _data11_;
	GVariant* _tmp0_;
	gchar* _tmp1_;
	gdouble min_double = 0.0;
	gdouble max_double = 0.0;
	GtkAdjustment* adjustment = NULL;
	GtkAdjustment* _tmp12_;
	GtkEntryBuffer* _tmp13_;
	GtkEntryBuffer* _tmp14_;
	GtkEntryBuffer* _tmp15_;
	gulong _tmp16_;
	gulong _tmp17_;
	gulong _tmp18_;
	gulong _tmp19_;
	g_return_val_if_fail (initial_value != NULL, NULL);
	g_return_val_if_fail (type_string != NULL, NULL);
	_vala_return_val_if_fail ((((((g_strcmp0 (type_string, "y") == 0) || (g_strcmp0 (type_string, "n") == 0)) || (g_strcmp0 (type_string, "q") == 0)) || (g_strcmp0 (type_string, "i") == 0)) || (g_strcmp0 (type_string, "u") == 0)) || (g_strcmp0 (type_string, "h") == 0), "type_string == \"y\" || type_string == \"n\" || type_string == \"q\" || type_string == \"i\" || type_string == \"u\" || type_string == \"h\"", NULL);
	_data11_ = g_slice_new0 (Block11Data);
	_data11_->_ref_count_ = 1;
	self = (KeyEditorChildNumberInt*) g_object_new (object_type, NULL);
	_data11_->self = g_object_ref (self);
	_tmp0_ = _g_variant_ref0 (initial_value);
	_g_variant_unref0 (self->priv->variant);
	self->priv->variant = _tmp0_;
	_tmp1_ = g_strdup (type_string);
	_g_free0 (self->priv->key_type);
	self->priv->key_type = _tmp1_;
	gtk_widget_set_visible ((GtkWidget*) self, TRUE);
	gtk_widget_set_hexpand ((GtkWidget*) self, TRUE);
	gtk_widget_set_halign ((GtkWidget*) self, GTK_ALIGN_START);
	if (range_content_or_null != NULL) {
		GVariant* min_variant = NULL;
		GVariant* _tmp2_;
		GVariant* max_variant = NULL;
		GVariant* _tmp3_;
		GVariant* _tmp4_;
		GVariant* _tmp5_;
		GVariant* _tmp6_;
		GVariant* _tmp7_;
		if (g_strcmp0 (type_string, "h") == 0) {
			g_assert_not_reached ();
		}
		_tmp2_ = g_variant_get_child_value ((GVariant*) range_content_or_null, (gsize) 0);
		min_variant = _tmp2_;
		_tmp3_ = g_variant_get_child_value ((GVariant*) range_content_or_null, (gsize) 1);
		max_variant = _tmp3_;
		_tmp4_ = min_variant;
		min_double = key_editor_child_number_int_get_variant_as_double (_tmp4_);
		_tmp5_ = max_variant;
		max_double = key_editor_child_number_int_get_variant_as_double (_tmp5_);
		_tmp6_ = min_variant;
		self->priv->min_int64 = key_editor_child_number_int_get_variant_as_int64 (_tmp6_);
		_tmp7_ = max_variant;
		self->priv->max_int64 = key_editor_child_number_int_get_variant_as_int64 (_tmp7_);
		_g_variant_unref0 (max_variant);
		_g_variant_unref0 (min_variant);
	} else {
		gdouble _tmp8_ = 0.0;
		gdouble _tmp9_ = 0.0;
		gint64 _tmp10_ = 0LL;
		gint64 _tmp11_ = 0LL;
		key_editor_child_number_int_get_min_and_max_double (&_tmp8_, &_tmp9_, type_string);
		min_double = _tmp8_;
		max_double = _tmp9_;
		key_editor_child_number_int_get_min_and_max_int64 (&_tmp10_, &_tmp11_, type_string);
		self->priv->min_int64 = _tmp10_;
		self->priv->max_int64 = _tmp11_;
	}
	_tmp12_ = gtk_adjustment_new (key_editor_child_number_int_get_variant_as_double (initial_value), min_double, max_double, 1.0, 5.0, 0.0);
	g_object_ref_sink (_tmp12_);
	adjustment = _tmp12_;
	gtk_spin_button_configure ((GtkSpinButton*) self, adjustment, 1.0, (guint) 0);
	gtk_spin_button_set_update_policy ((GtkSpinButton*) self, GTK_UPDATE_IF_VALID);
	gtk_spin_button_set_snap_to_ticks ((GtkSpinButton*) self, TRUE);
	gtk_spin_button_set_numeric ((GtkSpinButton*) self, TRUE);
	gtk_entry_set_input_purpose ((GtkEntry*) self, GTK_INPUT_PURPOSE_NUMBER);
	gtk_entry_set_max_width_chars ((GtkEntry*) self, 30);
	_tmp13_ = gtk_entry_get_buffer ((GtkEntry*) self);
	_tmp14_ = _tmp13_;
	_tmp15_ = _g_object_ref0 (_tmp14_);
	_data11_->ref_buffer = _tmp15_;
	_tmp16_ = g_signal_connect_object (_data11_->ref_buffer, "deleted-text", (GCallback) ___lambda58__gtk_entry_buffer_deleted_text, self, 0);
	self->priv->deleted_text_handler = _tmp16_;
	_tmp17_ = g_signal_connect_object (_data11_->ref_buffer, "inserted-text", (GCallback) ___lambda59__gtk_entry_buffer_inserted_text, self, 0);
	self->priv->inserted_text_handler = _tmp17_;
	_tmp18_ = g_signal_connect_object ((GtkEntry*) self, "activate", (GCallback) ___lambda60__gtk_entry_activate, self, 0);
	_data11_->entry_activated_handler = _tmp18_;
	_tmp19_ = g_signal_connect_object ((GObject*) self, "notify::sensitive", (GCallback) _key_editor_child_number_int_set_error_class_g_object_notify, self, 0);
	_data11_->entry_sensitive_handler = _tmp19_;
	g_signal_connect_data ((GtkWidget*) self, "destroy", (GCallback) ___lambda61__gtk_widget_destroy, block11_data_ref (_data11_), (GClosureNotify) block11_data_unref, 0);
	_g_object_unref0 (adjustment);
	block11_data_unref (_data11_);
	_data11_ = NULL;
	return self;
}

KeyEditorChildNumberInt*
key_editor_child_number_int_new (GVariant* initial_value,
                                 const gchar* type_string,
                                 GVariant* range_content_or_null)
{
	return key_editor_child_number_int_construct (TYPE_KEY_EDITOR_CHILD_NUMBER_INT, initial_value, type_string, range_content_or_null);
}

static void
key_editor_child_number_int_get_min_and_max_double (gdouble* min,
                                                    gdouble* max,
                                                    const gchar* variant_type)
{
	gdouble _vala_min = 0.0;
	gdouble _vala_max = 0.0;
	const gchar* _tmp0_;
	GQuark _tmp2_ = 0U;
	static GQuark _tmp1_label0 = 0;
	static GQuark _tmp1_label1 = 0;
	static GQuark _tmp1_label2 = 0;
	static GQuark _tmp1_label3 = 0;
	static GQuark _tmp1_label4 = 0;
	static GQuark _tmp1_label5 = 0;
	g_return_if_fail (variant_type != NULL);
	_tmp0_ = variant_type;
	_tmp2_ = (NULL == _tmp0_) ? 0 : g_quark_from_string (_tmp0_);
	if (_tmp2_ == ((0 != _tmp1_label0) ? _tmp1_label0 : (_tmp1_label0 = g_quark_from_static_string ("i")))) {
		switch (0) {
			default:
			{
				_vala_min = (gdouble) G_MININT32;
				_vala_max = (gdouble) G_MAXINT32;
				break;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label1) ? _tmp1_label1 : (_tmp1_label1 = g_quark_from_static_string ("u")))) {
		switch (0) {
			default:
			{
				_vala_min = (gdouble) 0U;
				_vala_max = (gdouble) G_MAXUINT32;
				break;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label2) ? _tmp1_label2 : (_tmp1_label2 = g_quark_from_static_string ("n")))) {
		switch (0) {
			default:
			{
				_vala_min = (gdouble) G_MININT16;
				_vala_max = (gdouble) G_MAXINT16;
				break;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label3) ? _tmp1_label3 : (_tmp1_label3 = g_quark_from_static_string ("q")))) {
		switch (0) {
			default:
			{
				_vala_min = (gdouble) 0U;
				_vala_max = (gdouble) G_MAXUINT16;
				break;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label4) ? _tmp1_label4 : (_tmp1_label4 = g_quark_from_static_string ("y")))) {
		switch (0) {
			default:
			{
				_vala_min = (gdouble) 0U;
				_vala_max = (gdouble) G_MAXUINT8;
				break;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label5) ? _tmp1_label5 : (_tmp1_label5 = g_quark_from_static_string ("h")))) {
		switch (0) {
			default:
			{
				_vala_min = (gdouble) G_MININT32;
				_vala_max = (gdouble) G_MAXINT32;
				break;
			}
		}
	} else {
		switch (0) {
			default:
			{
				g_assert_not_reached ();
			}
		}
	}
	if (min) {
		*min = _vala_min;
	}
	if (max) {
		*max = _vala_max;
	}
}

static void
key_editor_child_number_int_get_min_and_max_int64 (gint64* min,
                                                   gint64* max,
                                                   const gchar* variant_type)
{
	gint64 _vala_min = 0LL;
	gint64 _vala_max = 0LL;
	const gchar* _tmp0_;
	GQuark _tmp2_ = 0U;
	static GQuark _tmp1_label0 = 0;
	static GQuark _tmp1_label1 = 0;
	static GQuark _tmp1_label2 = 0;
	static GQuark _tmp1_label3 = 0;
	static GQuark _tmp1_label4 = 0;
	static GQuark _tmp1_label5 = 0;
	g_return_if_fail (variant_type != NULL);
	_tmp0_ = variant_type;
	_tmp2_ = (NULL == _tmp0_) ? 0 : g_quark_from_string (_tmp0_);
	if (_tmp2_ == ((0 != _tmp1_label0) ? _tmp1_label0 : (_tmp1_label0 = g_quark_from_static_string ("i")))) {
		switch (0) {
			default:
			{
				_vala_min = (gint64) G_MININT32;
				_vala_max = (gint64) G_MAXINT32;
				break;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label1) ? _tmp1_label1 : (_tmp1_label1 = g_quark_from_static_string ("u")))) {
		switch (0) {
			default:
			{
				_vala_min = (gint64) 0U;
				_vala_max = (gint64) G_MAXUINT32;
				break;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label2) ? _tmp1_label2 : (_tmp1_label2 = g_quark_from_static_string ("n")))) {
		switch (0) {
			default:
			{
				_vala_min = (gint64) G_MININT16;
				_vala_max = (gint64) G_MAXINT16;
				break;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label3) ? _tmp1_label3 : (_tmp1_label3 = g_quark_from_static_string ("q")))) {
		switch (0) {
			default:
			{
				_vala_min = (gint64) 0U;
				_vala_max = (gint64) G_MAXUINT16;
				break;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label4) ? _tmp1_label4 : (_tmp1_label4 = g_quark_from_static_string ("y")))) {
		switch (0) {
			default:
			{
				_vala_min = (gint64) 0U;
				_vala_max = (gint64) G_MAXUINT8;
				break;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label5) ? _tmp1_label5 : (_tmp1_label5 = g_quark_from_static_string ("h")))) {
		switch (0) {
			default:
			{
				_vala_min = (gint64) G_MININT32;
				_vala_max = (gint64) G_MAXINT32;
				break;
			}
		}
	} else {
		switch (0) {
			default:
			{
				g_assert_not_reached ();
			}
		}
	}
	if (min) {
		*min = _vala_min;
	}
	if (max) {
		*max = _vala_max;
	}
}

static gdouble
key_editor_child_number_int_get_variant_as_double (GVariant* variant)
{
	gdouble result;
	g_return_val_if_fail (variant != NULL, 0.0);
	switch (g_variant_classify (variant)) {
		case G_VARIANT_CLASS_INT32:
		{
			result = (gdouble) g_variant_get_int32 (variant);
			return result;
		}
		case G_VARIANT_CLASS_UINT32:
		{
			result = (gdouble) g_variant_get_uint32 (variant);
			return result;
		}
		case G_VARIANT_CLASS_INT16:
		{
			result = (gdouble) g_variant_get_int16 (variant);
			return result;
		}
		case G_VARIANT_CLASS_UINT16:
		{
			result = (gdouble) g_variant_get_uint16 (variant);
			return result;
		}
		case G_VARIANT_CLASS_BYTE:
		{
			result = (gdouble) g_variant_get_byte (variant);
			return result;
		}
		case G_VARIANT_CLASS_HANDLE:
		{
			result = (gdouble) g_variant_get_handle (variant);
			return result;
		}
		default:
		{
			g_assert_not_reached ();
		}
	}
}

static gint64
key_editor_child_number_int_get_variant_as_int64 (GVariant* variant)
{
	gint64 result;
	g_return_val_if_fail (variant != NULL, 0LL);
	switch (g_variant_classify (variant)) {
		case G_VARIANT_CLASS_INT32:
		{
			result = (gint64) g_variant_get_int32 (variant);
			return result;
		}
		case G_VARIANT_CLASS_UINT32:
		{
			result = (gint64) g_variant_get_uint32 (variant);
			return result;
		}
		case G_VARIANT_CLASS_INT16:
		{
			result = (gint64) g_variant_get_int16 (variant);
			return result;
		}
		case G_VARIANT_CLASS_UINT16:
		{
			result = (gint64) g_variant_get_uint16 (variant);
			return result;
		}
		case G_VARIANT_CLASS_BYTE:
		{
			result = (gint64) g_variant_get_byte (variant);
			return result;
		}
		case G_VARIANT_CLASS_HANDLE:
		{
			result = (gint64) g_variant_get_handle (variant);
			return result;
		}
		default:
		{
			g_assert_not_reached ();
		}
	}
}

static GVariant*
key_editor_child_number_int_real_get_variant (KeyEditorChild* base)
{
	KeyEditorChildNumberInt * self;
	GVariant* _tmp0_;
	GVariant* _tmp1_;
	GVariant* result;
	self = (KeyEditorChildNumberInt*) base;
	_tmp0_ = self->priv->variant;
	_tmp1_ = _g_variant_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}

static void
key_editor_child_number_int_real_reload (KeyEditorChild* base,
                                         GVariant* gvariant)
{
	KeyEditorChildNumberInt * self;
	GtkEntryBuffer* _tmp0_;
	GtkEntryBuffer* _tmp1_;
	GtkEntryBuffer* _tmp2_;
	GtkEntryBuffer* _tmp3_;
	self = (KeyEditorChildNumberInt*) base;
	g_return_if_fail (gvariant != NULL);
	_tmp0_ = gtk_entry_get_buffer ((GtkEntry*) self);
	_tmp1_ = _tmp0_;
	key_editor_child_set_lock_on ((GObject*) _tmp1_, self->priv->deleted_text_handler, self->priv->inserted_text_handler);
	gtk_spin_button_set_value ((GtkSpinButton*) self, key_editor_child_number_int_get_variant_as_double (gvariant));
	_tmp2_ = gtk_entry_get_buffer ((GtkEntry*) self);
	_tmp3_ = _tmp2_;
	key_editor_child_set_lock_off ((GObject*) _tmp3_, self->priv->deleted_text_handler, self->priv->inserted_text_handler);
}

static void
key_editor_child_number_int_set_error_class (KeyEditorChildNumberInt* self)
{
	GtkStyleContext* context = NULL;
	GtkStyleContext* _tmp0_;
	GtkStyleContext* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_widget_get_style_context ((GtkWidget*) self);
	_tmp1_ = _g_object_ref0 (_tmp0_);
	context = _tmp1_;
	if (gtk_widget_is_sensitive ((GtkWidget*) self)) {
		if (self->priv->value_has_error) {
			GtkStyleContext* _tmp2_;
			_tmp2_ = context;
			if (!gtk_style_context_has_class (_tmp2_, "error")) {
				GtkStyleContext* _tmp3_;
				_tmp3_ = context;
				gtk_style_context_add_class (_tmp3_, "error");
			}
		} else {
			GtkStyleContext* _tmp4_;
			_tmp4_ = context;
			if (gtk_style_context_has_class (_tmp4_, "error")) {
				GtkStyleContext* _tmp5_;
				_tmp5_ = context;
				gtk_style_context_remove_class (_tmp5_, "error");
			}
		}
	} else {
		GtkStyleContext* _tmp6_;
		_tmp6_ = context;
		if (gtk_style_context_has_class (_tmp6_, "error")) {
			GtkStyleContext* _tmp7_;
			_tmp7_ = context;
			gtk_style_context_remove_class (_tmp7_, "error");
		}
	}
	_g_object_unref0 (context);
}

static gboolean
key_editor_child_number_int_test_value (KeyEditorChildNumberInt* self)
{
	GVariant* tmp_variant = NULL;
	gchar* tmp_text = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gint64 variant_value = 0LL;
	GVariant* _tmp10_;
	gboolean _tmp11_ = FALSE;
	GError* _inner_error0_ = NULL;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = gtk_entry_get_text ((GtkEntry*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strdup (_tmp1_);
	tmp_text = _tmp2_;
	{
		GVariant* _tmp3_ = NULL;
		const GVariantType* _tmp4_;
		const gchar* _tmp5_;
		GVariant* _tmp6_;
		GVariant* _tmp8_;
		_tmp4_ = G_VARIANT_TYPE_INT64;
		_tmp5_ = tmp_text;
		_tmp6_ = g_variant_parse (_tmp4_, _tmp5_, NULL, NULL, &_inner_error0_);
		_tmp3_ = _tmp6_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp7_ = FALSE;
			if (_inner_error0_->domain == G_VARIANT_PARSE_ERROR) {
				goto __catch0_g_variant_parse_error;
			}
			_g_free0 (tmp_text);
			_g_variant_unref0 (tmp_variant);
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return _tmp7_;
		}
		_tmp8_ = _tmp3_;
		_tmp3_ = NULL;
		_g_variant_unref0 (tmp_variant);
		tmp_variant = _tmp8_;
		_g_variant_unref0 (_tmp3_);
	}
	goto __finally0;
	__catch0_g_variant_parse_error:
	{
		g_clear_error (&_inner_error0_);
		self->priv->value_has_error = TRUE;
		key_editor_child_number_int_set_error_class (self);
		result = FALSE;
		_g_free0 (tmp_text);
		_g_variant_unref0 (tmp_variant);
		return result;
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gboolean _tmp9_ = FALSE;
		_g_free0 (tmp_text);
		_g_variant_unref0 (tmp_variant);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return _tmp9_;
	}
	_tmp10_ = tmp_variant;
	variant_value = g_variant_get_int64 ((GVariant*) _tmp10_);
	if (variant_value < self->priv->min_int64) {
		_tmp11_ = TRUE;
	} else {
		_tmp11_ = variant_value > self->priv->max_int64;
	}
	if (_tmp11_) {
		self->priv->value_has_error = TRUE;
		key_editor_child_number_int_set_error_class (self);
		result = FALSE;
		_g_free0 (tmp_text);
		_g_variant_unref0 (tmp_variant);
		return result;
	} else {
		const gchar* _tmp12_;
		GVariant* _tmp13_;
		self->priv->value_has_error = FALSE;
		key_editor_child_number_int_set_error_class (self);
		_tmp12_ = self->priv->key_type;
		_tmp13_ = key_editor_child_number_int_get_variant_from_int64 (variant_value, _tmp12_);
		_g_variant_unref0 (self->priv->variant);
		self->priv->variant = _tmp13_;
		result = TRUE;
		_g_free0 (tmp_text);
		_g_variant_unref0 (tmp_variant);
		return result;
	}
}

static GVariant*
key_editor_child_number_int_get_variant_from_int64 (gint64 int64_value,
                                                    const gchar* key_type)
{
	const gchar* _tmp0_;
	GQuark _tmp2_ = 0U;
	static GQuark _tmp1_label0 = 0;
	static GQuark _tmp1_label1 = 0;
	static GQuark _tmp1_label2 = 0;
	static GQuark _tmp1_label3 = 0;
	static GQuark _tmp1_label4 = 0;
	static GQuark _tmp1_label5 = 0;
	GVariant* result;
	g_return_val_if_fail (key_type != NULL, NULL);
	_tmp0_ = key_type;
	_tmp2_ = (NULL == _tmp0_) ? 0 : g_quark_from_string (_tmp0_);
	if (_tmp2_ == ((0 != _tmp1_label0) ? _tmp1_label0 : (_tmp1_label0 = g_quark_from_static_string ("i")))) {
		switch (0) {
			default:
			{
				GVariant* _tmp3_;
				_tmp3_ = g_variant_new_int32 ((gint32) int64_value);
				g_variant_ref_sink (_tmp3_);
				result = _tmp3_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label1) ? _tmp1_label1 : (_tmp1_label1 = g_quark_from_static_string ("u")))) {
		switch (0) {
			default:
			{
				GVariant* _tmp4_;
				_tmp4_ = g_variant_new_uint32 ((guint32) int64_value);
				g_variant_ref_sink (_tmp4_);
				result = _tmp4_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label2) ? _tmp1_label2 : (_tmp1_label2 = g_quark_from_static_string ("n")))) {
		switch (0) {
			default:
			{
				GVariant* _tmp5_;
				_tmp5_ = g_variant_new_int16 ((gint16) int64_value);
				g_variant_ref_sink (_tmp5_);
				result = _tmp5_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label3) ? _tmp1_label3 : (_tmp1_label3 = g_quark_from_static_string ("q")))) {
		switch (0) {
			default:
			{
				GVariant* _tmp6_;
				_tmp6_ = g_variant_new_uint16 ((guint16) int64_value);
				g_variant_ref_sink (_tmp6_);
				result = _tmp6_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label4) ? _tmp1_label4 : (_tmp1_label4 = g_quark_from_static_string ("y")))) {
		switch (0) {
			default:
			{
				GVariant* _tmp7_;
				_tmp7_ = g_variant_new_byte ((guint8) int64_value);
				g_variant_ref_sink (_tmp7_);
				result = _tmp7_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label5) ? _tmp1_label5 : (_tmp1_label5 = g_quark_from_static_string ("h")))) {
		switch (0) {
			default:
			{
				GVariant* _tmp8_;
				_tmp8_ = g_variant_new_handle ((gint32) int64_value);
				g_variant_ref_sink (_tmp8_);
				result = _tmp8_;
				return result;
			}
		}
	} else {
		switch (0) {
			default:
			{
				g_assert_not_reached ();
			}
		}
	}
}

static void
key_editor_child_number_int_class_init (KeyEditorChildNumberIntClass * klass,
                                        gpointer klass_data)
{
	key_editor_child_number_int_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &KeyEditorChildNumberInt_private_offset);
	G_OBJECT_CLASS (klass)->finalize = key_editor_child_number_int_finalize;
}

static void
key_editor_child_number_int_key_editor_child_interface_init (KeyEditorChildIface * iface,
                                                             gpointer iface_data)
{
	key_editor_child_number_int_key_editor_child_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_variant = (GVariant* (*) (KeyEditorChild*)) key_editor_child_number_int_real_get_variant;
	iface->reload = (void (*) (KeyEditorChild*, GVariant*)) key_editor_child_number_int_real_reload;
}

static void
key_editor_child_number_int_instance_init (KeyEditorChildNumberInt * self,
                                           gpointer klass)
{
	self->priv = key_editor_child_number_int_get_instance_private (self);
	self->priv->deleted_text_handler = (gulong) 0;
	self->priv->inserted_text_handler = (gulong) 0;
	self->priv->value_has_error = FALSE;
}

static void
key_editor_child_number_int_finalize (GObject * obj)
{
	KeyEditorChildNumberInt * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_KEY_EDITOR_CHILD_NUMBER_INT, KeyEditorChildNumberInt);
	_g_variant_unref0 (self->priv->variant);
	_g_free0 (self->priv->key_type);
	G_OBJECT_CLASS (key_editor_child_number_int_parent_class)->finalize (obj);
}

static GType
key_editor_child_number_int_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (KeyEditorChildNumberIntClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) key_editor_child_number_int_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (KeyEditorChildNumberInt), 0, (GInstanceInitFunc) key_editor_child_number_int_instance_init, NULL };
	static const GInterfaceInfo key_editor_child_info = { (GInterfaceInitFunc) key_editor_child_number_int_key_editor_child_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType key_editor_child_number_int_type_id;
	key_editor_child_number_int_type_id = g_type_register_static (gtk_spin_button_get_type (), "KeyEditorChildNumberInt", &g_define_type_info, 0);
	g_type_add_interface_static (key_editor_child_number_int_type_id, TYPE_KEY_EDITOR_CHILD, &key_editor_child_info);
	KeyEditorChildNumberInt_private_offset = g_type_add_instance_private (key_editor_child_number_int_type_id, sizeof (KeyEditorChildNumberIntPrivate));
	return key_editor_child_number_int_type_id;
}

GType
key_editor_child_number_int_get_type (void)
{
	static volatile gsize key_editor_child_number_int_type_id__once = 0;
	if (g_once_init_enter (&key_editor_child_number_int_type_id__once)) {
		GType key_editor_child_number_int_type_id;
		key_editor_child_number_int_type_id = key_editor_child_number_int_get_type_once ();
		g_once_init_leave (&key_editor_child_number_int_type_id__once, key_editor_child_number_int_type_id);
	}
	return key_editor_child_number_int_type_id__once;
}

static inline gpointer
key_editor_child_array_get_instance_private (KeyEditorChildArray* self)
{
	return G_STRUCT_MEMBER_P (self, KeyEditorChildArray_private_offset);
}

static Block12Data*
block12_data_ref (Block12Data* _data12_)
{
	g_atomic_int_inc (&_data12_->_ref_count_);
	return _data12_;
}

static void
block12_data_unref (void * _userdata_)
{
	Block12Data* _data12_;
	_data12_ = (Block12Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data12_->_ref_count_)) {
		KeyEditorChildArray* self;
		self = _data12_->self;
		_g_object_unref0 (_data12_->ref_buffer);
		_g_object_unref0 (self);
		g_slice_free (Block12Data, _data12_);
	}
}

static gboolean
_key_editor_child_array_on_key_press_event_gtk_widget_key_press_event (GtkWidget* _sender,
                                                                       GdkEventKey* event,
                                                                       gpointer self)
{
	gboolean result;
	result = key_editor_child_array_on_key_press_event ((KeyEditorChildArray*) self, event);
	return result;
}

static gboolean
_key_editor_child_array_event_stop_gtk_widget_button_press_event (GtkWidget* _sender,
                                                                  GdkEventButton* event,
                                                                  gpointer self)
{
	gboolean result;
	result = key_editor_child_array_event_stop ();
	return result;
}

static gboolean
_key_editor_child_array_event_stop_gtk_widget_button_release_event (GtkWidget* _sender,
                                                                    GdkEventButton* event,
                                                                    gpointer self)
{
	gboolean result;
	result = key_editor_child_array_event_stop ();
	return result;
}

static void
__lambda68_ (KeyEditorChildArray* self)
{
	g_signal_emit ((KeyEditorChild*) self, key_editor_child_signals[KEY_EDITOR_CHILD_VALUE_HAS_CHANGED_SIGNAL], 0, key_editor_child_array_test_value (self));
}

static void
___lambda68__gtk_text_buffer_delete_range (GtkTextBuffer* _sender,
                                           GtkTextIter* start,
                                           GtkTextIter* end,
                                           gpointer self)
{
	__lambda68_ ((KeyEditorChildArray*) self);
}

static void
__lambda69_ (KeyEditorChildArray* self)
{
	g_signal_emit ((KeyEditorChild*) self, key_editor_child_signals[KEY_EDITOR_CHILD_VALUE_HAS_CHANGED_SIGNAL], 0, key_editor_child_array_test_value (self));
}

static void
___lambda69__gtk_text_buffer_insert_text (GtkTextBuffer* _sender,
                                          GtkTextIter* pos,
                                          const gchar* new_text,
                                          gint new_text_length,
                                          gpointer self)
{
	__lambda69_ ((KeyEditorChildArray*) self);
}

static void
__lambda70_ (Block12Data* _data12_)
{
	KeyEditorChildArray* self;
	self = _data12_->self;
	g_signal_handler_disconnect ((GObject*) _data12_->ref_buffer, self->priv->deleted_text_handler);
	g_signal_handler_disconnect ((GObject*) _data12_->ref_buffer, self->priv->inserted_text_handler);
}

static void
___lambda70__gtk_widget_destroy (GtkWidget* _sender,
                                 gpointer self)
{
	__lambda70_ (self);
}

KeyEditorChildArray*
key_editor_child_array_construct (GType object_type,
                                  const gchar* type_string,
                                  GVariant* initial_value)
{
	KeyEditorChildArray * self = NULL;
	Block12Data* _data12_;
	GtkStyleContext* _tmp0_;
	gchar* _tmp1_;
	GVariant* _tmp2_;
	GtkScrolledWindow* scrolled_window = NULL;
	GtkScrolledWindow* _tmp3_;
	GtkTextView* _tmp4_;
	GtkTextView* _tmp5_;
	GtkTextView* _tmp6_;
	GtkTextView* _tmp7_;
	GtkTextView* _tmp8_;
	GtkTextView* _tmp9_;
	GtkTextView* _tmp10_;
	GtkTextView* _tmp11_;
	GtkTextView* _tmp12_;
	GtkRevealer* _tmp13_;
	GtkRevealer* _tmp14_;
	GtkRevealer* _tmp15_;
	GtkRevealer* _tmp16_;
	GtkRevealer* _tmp17_;
	GtkActionBar* error_bar = NULL;
	GtkActionBar* _tmp18_;
	GtkRevealer* _tmp19_;
	GtkImage* error_icon = NULL;
	GtkImage* _tmp20_;
	GtkLabel* error_label = NULL;
	GtkLabel* _tmp21_;
	GtkTextView* _tmp22_;
	GtkTextBuffer* _tmp23_;
	GtkTextBuffer* _tmp24_;
	gchar* _tmp25_;
	gchar* _tmp26_;
	GtkTextView* _tmp27_;
	GtkTextBuffer* _tmp28_;
	GtkTextBuffer* _tmp29_;
	GtkTextBuffer* _tmp30_;
	gulong _tmp31_;
	gulong _tmp32_;
	g_return_val_if_fail (type_string != NULL, NULL);
	g_return_val_if_fail (initial_value != NULL, NULL);
	_data12_ = g_slice_new0 (Block12Data);
	_data12_->_ref_count_ = 1;
	self = (KeyEditorChildArray*) g_object_new (object_type, NULL);
	_data12_->self = g_object_ref (self);
	gtk_widget_set_visible ((GtkWidget*) self, TRUE);
	gtk_widget_set_hexpand ((GtkWidget*) self, TRUE);
	gtk_widget_set_vexpand ((GtkWidget*) self, FALSE);
	gtk_orientable_set_orientation ((GtkOrientable*) self, GTK_ORIENTATION_VERTICAL);
	_tmp0_ = gtk_widget_get_style_context ((GtkWidget*) self);
	gtk_style_context_add_class (_tmp0_, "frame");
	_tmp1_ = g_strdup (type_string);
	_g_free0 (self->priv->key_type);
	self->priv->key_type = _tmp1_;
	_tmp2_ = _g_variant_ref0 (initial_value);
	_g_variant_unref0 (self->priv->variant);
	self->priv->variant = _tmp2_;
	_tmp3_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
	g_object_ref_sink (_tmp3_);
	scrolled_window = _tmp3_;
	gtk_widget_set_visible ((GtkWidget*) scrolled_window, TRUE);
	_tmp4_ = (GtkTextView*) gtk_text_view_new ();
	g_object_ref_sink (_tmp4_);
	_g_object_unref0 (self->priv->text_view);
	self->priv->text_view = _tmp4_;
	_tmp5_ = self->priv->text_view;
	gtk_widget_set_visible ((GtkWidget*) _tmp5_, TRUE);
	_tmp6_ = self->priv->text_view;
	g_object_set ((GtkWidget*) _tmp6_, "expand", TRUE, NULL);
	_tmp7_ = self->priv->text_view;
	gtk_text_view_set_wrap_mode (_tmp7_, GTK_WRAP_WORD);
	_tmp8_ = self->priv->text_view;
	gtk_text_view_set_monospace (_tmp8_, TRUE);
	_tmp9_ = self->priv->text_view;
	g_signal_connect_object ((GtkWidget*) _tmp9_, "key-press-event", (GCallback) _key_editor_child_array_on_key_press_event_gtk_widget_key_press_event, self, 0);
	_tmp10_ = self->priv->text_view;
	g_signal_connect_after ((GtkWidget*) _tmp10_, "button-press-event", (GCallback) _key_editor_child_array_event_stop_gtk_widget_button_press_event, NULL);
	_tmp11_ = self->priv->text_view;
	g_signal_connect_after ((GtkWidget*) _tmp11_, "button-release-event", (GCallback) _key_editor_child_array_event_stop_gtk_widget_button_release_event, NULL);
	_tmp12_ = self->priv->text_view;
	gtk_container_add ((GtkContainer*) scrolled_window, (GtkWidget*) _tmp12_);
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) scrolled_window);
	_tmp13_ = (GtkRevealer*) gtk_revealer_new ();
	g_object_ref_sink (_tmp13_);
	_g_object_unref0 (self->priv->error_revealer);
	self->priv->error_revealer = _tmp13_;
	_tmp14_ = self->priv->error_revealer;
	gtk_widget_set_visible ((GtkWidget*) _tmp14_, TRUE);
	_tmp15_ = self->priv->error_revealer;
	gtk_revealer_set_transition_type (_tmp15_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_UP);
	_tmp16_ = self->priv->error_revealer;
	gtk_revealer_set_reveal_child (_tmp16_, FALSE);
	_tmp17_ = self->priv->error_revealer;
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp17_);
	_tmp18_ = (GtkActionBar*) gtk_action_bar_new ();
	g_object_ref_sink (_tmp18_);
	error_bar = _tmp18_;
	gtk_widget_set_visible ((GtkWidget*) error_bar, TRUE);
	_tmp19_ = self->priv->error_revealer;
	gtk_container_add ((GtkContainer*) _tmp19_, (GtkWidget*) error_bar);
	_tmp20_ = (GtkImage*) gtk_image_new_from_icon_name ("dialog-error-symbolic", (GtkIconSize) GTK_ICON_SIZE_BUTTON);
	g_object_ref_sink (_tmp20_);
	error_icon = _tmp20_;
	gtk_widget_set_visible ((GtkWidget*) error_icon, TRUE);
	gtk_action_bar_pack_start (error_bar, (GtkWidget*) error_icon);
	_tmp21_ = (GtkLabel*) gtk_label_new (KEY_EDITOR_CHILD_invalid_value_text);
	g_object_ref_sink (_tmp21_);
	error_label = _tmp21_;
	gtk_widget_set_visible ((GtkWidget*) error_label, TRUE);
	g_object_set (error_label, "wrap", TRUE, NULL);
	gtk_action_bar_pack_start (error_bar, (GtkWidget*) error_label);
	_tmp22_ = self->priv->text_view;
	_tmp23_ = gtk_text_view_get_buffer (_tmp22_);
	_tmp24_ = _tmp23_;
	_tmp25_ = g_variant_print (initial_value, FALSE);
	_tmp26_ = _tmp25_;
	g_object_set (_tmp24_, "text", _tmp26_, NULL);
	_g_free0 (_tmp26_);
	_tmp27_ = self->priv->text_view;
	_tmp28_ = gtk_text_view_get_buffer (_tmp27_);
	_tmp29_ = _tmp28_;
	_tmp30_ = _g_object_ref0 (_tmp29_);
	_data12_->ref_buffer = _tmp30_;
	_tmp31_ = g_signal_connect_object (_data12_->ref_buffer, "delete-range", (GCallback) ___lambda68__gtk_text_buffer_delete_range, self, G_CONNECT_AFTER);
	self->priv->deleted_text_handler = _tmp31_;
	_tmp32_ = g_signal_connect_object (_data12_->ref_buffer, "insert-text", (GCallback) ___lambda69__gtk_text_buffer_insert_text, self, G_CONNECT_AFTER);
	self->priv->inserted_text_handler = _tmp32_;
	g_signal_connect_data ((GtkWidget*) self, "destroy", (GCallback) ___lambda70__gtk_widget_destroy, block12_data_ref (_data12_), (GClosureNotify) block12_data_unref, 0);
	_g_object_unref0 (error_label);
	_g_object_unref0 (error_icon);
	_g_object_unref0 (error_bar);
	_g_object_unref0 (scrolled_window);
	block12_data_unref (_data12_);
	_data12_ = NULL;
	return self;
}

KeyEditorChildArray*
key_editor_child_array_new (const gchar* type_string,
                            GVariant* initial_value)
{
	return key_editor_child_array_construct (TYPE_KEY_EDITOR_CHILD_ARRAY, type_string, initial_value);
}

static gboolean
key_editor_child_array_on_key_press_event (KeyEditorChildArray* self,
                                           GdkEventKey* event)
{
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_;
	gchar* keyval_name = NULL;
	gchar* _tmp2_;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	const gchar* _tmp6_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (event != NULL, FALSE);
	_tmp1_ = gdk_keyval_name (event->keyval);
	_tmp0_ = _tmp1_;
	if (_tmp0_ == NULL) {
		_tmp0_ = "";
	}
	_tmp2_ = g_strdup ((const gchar*) _tmp0_);
	keyval_name = _tmp2_;
	_tmp6_ = keyval_name;
	if (g_strcmp0 (_tmp6_, "Return") == 0) {
		_tmp5_ = TRUE;
	} else {
		const gchar* _tmp7_;
		_tmp7_ = keyval_name;
		_tmp5_ = g_strcmp0 (_tmp7_, "KP_Enter") == 0;
	}
	if (_tmp5_) {
		_tmp4_ = (event->state & GDK_MODIFIER_MASK) == 0;
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		_tmp3_ = key_editor_child_array_test_value (self);
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		g_signal_emit ((KeyEditorChild*) self, key_editor_child_signals[KEY_EDITOR_CHILD_CHILD_ACTIVATED_SIGNAL], 0);
		result = GDK_EVENT_STOP;
		_g_free0 (keyval_name);
		return result;
	}
	result = GTK_WIDGET_CLASS (key_editor_child_array_parent_class)->key_press_event ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_grid_get_type (), GtkGrid), event);
	_g_free0 (keyval_name);
	return result;
}

static gboolean
key_editor_child_array_event_stop (void)
{
	gboolean result;
	result = GDK_EVENT_STOP;
	return result;
}

static gboolean
key_editor_child_array_test_value (KeyEditorChildArray* self)
{
	gchar* tmp_text = NULL;
	GtkTextView* _tmp0_;
	GtkTextBuffer* _tmp1_;
	GtkTextBuffer* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gboolean _tmp22_ = FALSE;
	GError* _inner_error0_ = NULL;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->text_view;
	_tmp1_ = gtk_text_view_get_buffer (_tmp0_);
	_tmp2_ = _tmp1_;
	g_object_get (_tmp2_, "text", &_tmp3_, NULL);
	_tmp4_ = _tmp3_;
	tmp_text = _tmp4_;
	{
		GVariant* tmp_variant = NULL;
		const gchar* _tmp5_;
		GVariantType* _tmp6_;
		GVariantType* _tmp7_;
		GVariant* _tmp8_;
		GVariant* _tmp9_;
		GVariant* _tmp11_;
		GtkStyleContext* context = NULL;
		GtkStyleContext* _tmp12_;
		GtkStyleContext* _tmp13_;
		GtkStyleContext* _tmp14_;
		GtkRevealer* _tmp16_;
		_tmp5_ = self->priv->key_type;
		_tmp6_ = g_variant_type_new (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp8_ = g_variant_parse (_tmp7_, tmp_text, NULL, NULL, &_inner_error0_);
		_tmp9_ = _tmp8_;
		_g_variant_type_free0 (_tmp7_);
		tmp_variant = _tmp9_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp10_ = FALSE;
			if (_inner_error0_->domain == G_VARIANT_PARSE_ERROR) {
				goto __catch0_g_variant_parse_error;
			}
			_g_free0 (tmp_text);
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return _tmp10_;
		}
		_tmp11_ = _g_variant_ref0 ((GVariant*) tmp_variant);
		_g_variant_unref0 (self->priv->variant);
		self->priv->variant = _tmp11_;
		_tmp12_ = gtk_widget_get_style_context ((GtkWidget*) self);
		_tmp13_ = _g_object_ref0 (_tmp12_);
		context = _tmp13_;
		_tmp14_ = context;
		if (gtk_style_context_has_class (_tmp14_, "error")) {
			GtkStyleContext* _tmp15_;
			_tmp15_ = context;
			gtk_style_context_remove_class (_tmp15_, "error");
		}
		_tmp16_ = self->priv->error_revealer;
		gtk_revealer_set_reveal_child (_tmp16_, FALSE);
		result = TRUE;
		_g_object_unref0 (context);
		_g_variant_unref0 (tmp_variant);
		_g_free0 (tmp_text);
		return result;
	}
	goto __finally0;
	__catch0_g_variant_parse_error:
	{
		GtkStyleContext* context = NULL;
		GtkStyleContext* _tmp17_;
		GtkStyleContext* _tmp18_;
		GtkStyleContext* _tmp19_;
		GtkRevealer* _tmp21_;
		g_clear_error (&_inner_error0_);
		_tmp17_ = gtk_widget_get_style_context ((GtkWidget*) self);
		_tmp18_ = _g_object_ref0 (_tmp17_);
		context = _tmp18_;
		_tmp19_ = context;
		if (!gtk_style_context_has_class (_tmp19_, "error")) {
			GtkStyleContext* _tmp20_;
			_tmp20_ = context;
			gtk_style_context_add_class (_tmp20_, "error");
		}
		_tmp21_ = self->priv->error_revealer;
		gtk_revealer_set_reveal_child (_tmp21_, TRUE);
		result = FALSE;
		_g_object_unref0 (context);
		_g_free0 (tmp_text);
		return result;
	}
	__finally0:
	_g_free0 (tmp_text);
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
	g_clear_error (&_inner_error0_);
	return _tmp22_;
}

static GVariant*
key_editor_child_array_real_get_variant (KeyEditorChild* base)
{
	KeyEditorChildArray * self;
	GVariant* _tmp0_;
	GVariant* _tmp1_;
	GVariant* result;
	self = (KeyEditorChildArray*) base;
	_tmp0_ = self->priv->variant;
	_tmp1_ = _g_variant_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}

static void
key_editor_child_array_real_reload (KeyEditorChild* base,
                                    GVariant* gvariant)
{
	KeyEditorChildArray * self;
	GtkTextView* _tmp0_;
	GtkTextBuffer* _tmp1_;
	GtkTextBuffer* _tmp2_;
	GtkTextView* _tmp3_;
	GtkTextBuffer* _tmp4_;
	GtkTextBuffer* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	GtkTextView* _tmp8_;
	GtkTextBuffer* _tmp9_;
	GtkTextBuffer* _tmp10_;
	self = (KeyEditorChildArray*) base;
	g_return_if_fail (gvariant != NULL);
	_tmp0_ = self->priv->text_view;
	_tmp1_ = gtk_text_view_get_buffer (_tmp0_);
	_tmp2_ = _tmp1_;
	key_editor_child_set_lock_on ((GObject*) _tmp2_, self->priv->deleted_text_handler, self->priv->inserted_text_handler);
	_tmp3_ = self->priv->text_view;
	_tmp4_ = gtk_text_view_get_buffer (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = g_variant_print (gvariant, FALSE);
	_tmp7_ = _tmp6_;
	g_object_set (_tmp5_, "text", _tmp7_, NULL);
	_g_free0 (_tmp7_);
	if (!key_editor_child_array_test_value (self)) {
		g_assert_not_reached ();
	}
	_tmp8_ = self->priv->text_view;
	_tmp9_ = gtk_text_view_get_buffer (_tmp8_);
	_tmp10_ = _tmp9_;
	key_editor_child_set_lock_off ((GObject*) _tmp10_, self->priv->deleted_text_handler, self->priv->inserted_text_handler);
}

static GObject *
key_editor_child_array_constructor (GType type,
                                    guint n_construct_properties,
                                    GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	KeyEditorChildArray * self;
	GtkStyleContext* _tmp0_;
	parent_class = G_OBJECT_CLASS (key_editor_child_array_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_KEY_EDITOR_CHILD_ARRAY, KeyEditorChildArray);
	_tmp0_ = gtk_widget_get_style_context ((GtkWidget*) self);
	gtk_style_context_add_class (_tmp0_, "key-editor-child-array");
	return obj;
}

static void
key_editor_child_array_class_init (KeyEditorChildArrayClass * klass,
                                   gpointer klass_data)
{
	key_editor_child_array_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &KeyEditorChildArray_private_offset);
	G_OBJECT_CLASS (klass)->constructor = key_editor_child_array_constructor;
	G_OBJECT_CLASS (klass)->finalize = key_editor_child_array_finalize;
}

static void
key_editor_child_array_key_editor_child_interface_init (KeyEditorChildIface * iface,
                                                        gpointer iface_data)
{
	key_editor_child_array_key_editor_child_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_variant = (GVariant* (*) (KeyEditorChild*)) key_editor_child_array_real_get_variant;
	iface->reload = (void (*) (KeyEditorChild*, GVariant*)) key_editor_child_array_real_reload;
}

static void
key_editor_child_array_instance_init (KeyEditorChildArray * self,
                                      gpointer klass)
{
	self->priv = key_editor_child_array_get_instance_private (self);
	self->priv->deleted_text_handler = (gulong) 0;
	self->priv->inserted_text_handler = (gulong) 0;
}

static void
key_editor_child_array_finalize (GObject * obj)
{
	KeyEditorChildArray * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_KEY_EDITOR_CHILD_ARRAY, KeyEditorChildArray);
	_g_object_unref0 (self->priv->text_view);
	_g_object_unref0 (self->priv->error_revealer);
	_g_free0 (self->priv->key_type);
	_g_variant_unref0 (self->priv->variant);
	G_OBJECT_CLASS (key_editor_child_array_parent_class)->finalize (obj);
}

static GType
key_editor_child_array_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (KeyEditorChildArrayClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) key_editor_child_array_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (KeyEditorChildArray), 0, (GInstanceInitFunc) key_editor_child_array_instance_init, NULL };
	static const GInterfaceInfo key_editor_child_info = { (GInterfaceInitFunc) key_editor_child_array_key_editor_child_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType key_editor_child_array_type_id;
	key_editor_child_array_type_id = g_type_register_static (gtk_grid_get_type (), "KeyEditorChildArray", &g_define_type_info, 0);
	g_type_add_interface_static (key_editor_child_array_type_id, TYPE_KEY_EDITOR_CHILD, &key_editor_child_info);
	KeyEditorChildArray_private_offset = g_type_add_instance_private (key_editor_child_array_type_id, sizeof (KeyEditorChildArrayPrivate));
	return key_editor_child_array_type_id;
}

GType
key_editor_child_array_get_type (void)
{
	static volatile gsize key_editor_child_array_type_id__once = 0;
	if (g_once_init_enter (&key_editor_child_array_type_id__once)) {
		GType key_editor_child_array_type_id;
		key_editor_child_array_type_id = key_editor_child_array_get_type_once ();
		g_once_init_leave (&key_editor_child_array_type_id__once, key_editor_child_array_type_id);
	}
	return key_editor_child_array_type_id__once;
}

static inline gpointer
key_editor_child_default_get_instance_private (KeyEditorChildDefault* self)
{
	return G_STRUCT_MEMBER_P (self, KeyEditorChildDefault_private_offset);
}

static Block13Data*
block13_data_ref (Block13Data* _data13_)
{
	g_atomic_int_inc (&_data13_->_ref_count_);
	return _data13_;
}

static void
block13_data_unref (void * _userdata_)
{
	Block13Data* _data13_;
	_data13_ = (Block13Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data13_->_ref_count_)) {
		KeyEditorChildDefault* self;
		self = _data13_->self;
		_g_object_unref0 (_data13_->ref_buffer);
		_g_object_unref0 (self);
		g_slice_free (Block13Data, _data13_);
	}
}

static void
__lambda71_ (KeyEditorChildDefault* self)
{
	g_signal_emit ((KeyEditorChild*) self, key_editor_child_signals[KEY_EDITOR_CHILD_VALUE_HAS_CHANGED_SIGNAL], 0, key_editor_child_default_test_value (self));
}

static void
___lambda71__gtk_entry_buffer_deleted_text (GtkEntryBuffer* _sender,
                                            guint position,
                                            guint n_chars,
                                            gpointer self)
{
	__lambda71_ ((KeyEditorChildDefault*) self);
}

static void
__lambda72_ (KeyEditorChildDefault* self)
{
	g_signal_emit ((KeyEditorChild*) self, key_editor_child_signals[KEY_EDITOR_CHILD_VALUE_HAS_CHANGED_SIGNAL], 0, key_editor_child_default_test_value (self));
}

static void
___lambda72__gtk_entry_buffer_inserted_text (GtkEntryBuffer* _sender,
                                             guint position,
                                             const gchar* chars,
                                             guint n_chars,
                                             gpointer self)
{
	__lambda72_ ((KeyEditorChildDefault*) self);
}

static void
__lambda73_ (KeyEditorChildDefault* self)
{
	if (key_editor_child_default_test_value (self)) {
		g_signal_emit ((KeyEditorChild*) self, key_editor_child_signals[KEY_EDITOR_CHILD_CHILD_ACTIVATED_SIGNAL], 0);
	}
}

static void
___lambda73__gtk_entry_activate (GtkEntry* _sender,
                                 gpointer self)
{
	__lambda73_ ((KeyEditorChildDefault*) self);
}

static void
__lambda74_ (Block13Data* _data13_)
{
	KeyEditorChildDefault* self;
	self = _data13_->self;
	g_signal_handler_disconnect ((GObject*) _data13_->ref_buffer, self->priv->deleted_text_handler);
	g_signal_handler_disconnect ((GObject*) _data13_->ref_buffer, self->priv->inserted_text_handler);
	g_signal_handler_disconnect ((GObject*) self, _data13_->entry_activate_handler);
}

static void
___lambda74__gtk_widget_destroy (GtkWidget* _sender,
                                 gpointer self)
{
	__lambda74_ (self);
}

KeyEditorChildDefault*
key_editor_child_default_construct (GType object_type,
                                    const gchar* type_string,
                                    GVariant* initial_value)
{
	KeyEditorChildDefault * self = NULL;
	Block13Data* _data13_;
	gchar* _tmp0_;
	GVariant* _tmp1_;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gchar* _tmp4_ = NULL;
	GtkEntryBuffer* _tmp8_;
	GtkEntryBuffer* _tmp9_;
	GtkEntryBuffer* _tmp10_;
	gulong _tmp11_;
	gulong _tmp12_;
	gulong _tmp13_;
	g_return_val_if_fail (type_string != NULL, NULL);
	g_return_val_if_fail (initial_value != NULL, NULL);
	_data13_ = g_slice_new0 (Block13Data);
	_data13_->_ref_count_ = 1;
	self = (KeyEditorChildDefault*) g_object_new (object_type, NULL);
	_data13_->self = g_object_ref (self);
	_tmp0_ = g_strdup (type_string);
	_g_free0 (self->priv->key_type);
	self->priv->key_type = _tmp0_;
	_tmp1_ = _g_variant_ref0 (initial_value);
	_g_variant_unref0 (self->priv->variant);
	self->priv->variant = _tmp1_;
	gtk_widget_set_visible ((GtkWidget*) self, TRUE);
	gtk_widget_set_hexpand ((GtkWidget*) self, TRUE);
	g_object_set ((GtkEntry*) self, "secondary-icon-activatable", FALSE, NULL);
	gtk_entry_set_icon_tooltip_text ((GtkEntry*) self, GTK_ENTRY_ICON_SECONDARY, KEY_EDITOR_CHILD_invalid_value_text);
	if (g_strcmp0 (type_string, "s") == 0) {
		_tmp3_ = TRUE;
	} else {
		_tmp3_ = g_strcmp0 (type_string, "o") == 0;
	}
	if (_tmp3_) {
		_tmp2_ = TRUE;
	} else {
		_tmp2_ = g_strcmp0 (type_string, "g") == 0;
	}
	self->priv->is_string = _tmp2_;
	if (self->priv->is_string) {
		const gchar* _tmp5_;
		gchar* _tmp6_;
		_tmp5_ = g_variant_get_string (initial_value, NULL);
		_tmp6_ = g_strdup (_tmp5_);
		_g_free0 (_tmp4_);
		_tmp4_ = _tmp6_;
	} else {
		gchar* _tmp7_;
		_tmp7_ = g_variant_print (initial_value, FALSE);
		_g_free0 (_tmp4_);
		_tmp4_ = _tmp7_;
	}
	gtk_entry_set_text ((GtkEntry*) self, _tmp4_);
	_tmp8_ = gtk_entry_get_buffer ((GtkEntry*) self);
	_tmp9_ = _tmp8_;
	_tmp10_ = _g_object_ref0 (_tmp9_);
	_data13_->ref_buffer = _tmp10_;
	_tmp11_ = g_signal_connect_object (_data13_->ref_buffer, "deleted-text", (GCallback) ___lambda71__gtk_entry_buffer_deleted_text, self, 0);
	self->priv->deleted_text_handler = _tmp11_;
	_tmp12_ = g_signal_connect_object (_data13_->ref_buffer, "inserted-text", (GCallback) ___lambda72__gtk_entry_buffer_inserted_text, self, 0);
	self->priv->inserted_text_handler = _tmp12_;
	_tmp13_ = g_signal_connect_object ((GtkEntry*) self, "activate", (GCallback) ___lambda73__gtk_entry_activate, self, 0);
	_data13_->entry_activate_handler = _tmp13_;
	g_signal_connect_data ((GtkWidget*) self, "destroy", (GCallback) ___lambda74__gtk_widget_destroy, block13_data_ref (_data13_), (GClosureNotify) block13_data_unref, 0);
	_g_free0 (_tmp4_);
	block13_data_unref (_data13_);
	_data13_ = NULL;
	return self;
}

KeyEditorChildDefault*
key_editor_child_default_new (const gchar* type_string,
                              GVariant* initial_value)
{
	return key_editor_child_default_construct (TYPE_KEY_EDITOR_CHILD_DEFAULT, type_string, initial_value);
}

static const gchar*
string_to_string (const gchar* self)
{
	const gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	result = self;
	return result;
}

static gboolean
key_editor_child_default_test_value (KeyEditorChildDefault* self)
{
	const gchar* _tmp0_;
	gchar* _tmp4_ = NULL;
	gchar* tmp_text = NULL;
	gchar* _tmp12_;
	gboolean _tmp30_ = FALSE;
	GError* _inner_error0_ = NULL;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->key_type;
	if (g_strcmp0 (_tmp0_, "s") == 0) {
		const gchar* _tmp1_;
		const gchar* _tmp2_;
		GVariant* _tmp3_;
		_tmp1_ = gtk_entry_get_text ((GtkEntry*) self);
		_tmp2_ = _tmp1_;
		_tmp3_ = g_variant_new_string (_tmp2_);
		g_variant_ref_sink (_tmp3_);
		_g_variant_unref0 (self->priv->variant);
		self->priv->variant = _tmp3_;
		result = TRUE;
		return result;
	}
	if (self->priv->is_string) {
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		gchar* _tmp8_;
		_tmp5_ = gtk_entry_get_text ((GtkEntry*) self);
		_tmp6_ = _tmp5_;
		_tmp7_ = string_to_string (_tmp6_);
		_tmp8_ = g_strconcat ("'", _tmp7_, "'", NULL);
		_g_free0 (_tmp4_);
		_tmp4_ = _tmp8_;
	} else {
		const gchar* _tmp9_;
		const gchar* _tmp10_;
		gchar* _tmp11_;
		_tmp9_ = gtk_entry_get_text ((GtkEntry*) self);
		_tmp10_ = _tmp9_;
		_tmp11_ = g_strdup (_tmp10_);
		_g_free0 (_tmp4_);
		_tmp4_ = _tmp11_;
	}
	_tmp12_ = g_strdup (_tmp4_);
	tmp_text = _tmp12_;
	{
		GVariant* tmp_variant = NULL;
		const gchar* _tmp13_;
		GVariantType* _tmp14_;
		GVariantType* _tmp15_;
		const gchar* _tmp16_;
		GVariant* _tmp17_;
		GVariant* _tmp18_;
		GVariant* _tmp20_;
		GVariant* _tmp21_;
		GtkStyleContext* context = NULL;
		GtkStyleContext* _tmp22_;
		GtkStyleContext* _tmp23_;
		GtkStyleContext* _tmp24_;
		_tmp13_ = self->priv->key_type;
		_tmp14_ = g_variant_type_new (_tmp13_);
		_tmp15_ = _tmp14_;
		_tmp16_ = tmp_text;
		_tmp17_ = g_variant_parse (_tmp15_, _tmp16_, NULL, NULL, &_inner_error0_);
		_tmp18_ = _tmp17_;
		_g_variant_type_free0 (_tmp15_);
		tmp_variant = _tmp18_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp19_ = FALSE;
			if (_inner_error0_->domain == G_VARIANT_PARSE_ERROR) {
				goto __catch0_g_variant_parse_error;
			}
			_g_free0 (tmp_text);
			_g_free0 (_tmp4_);
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return _tmp19_;
		}
		_tmp20_ = tmp_variant;
		_tmp21_ = _g_variant_ref0 ((GVariant*) _tmp20_);
		_g_variant_unref0 (self->priv->variant);
		self->priv->variant = _tmp21_;
		_tmp22_ = gtk_widget_get_style_context ((GtkWidget*) self);
		_tmp23_ = _g_object_ref0 (_tmp22_);
		context = _tmp23_;
		_tmp24_ = context;
		if (gtk_style_context_has_class (_tmp24_, "error")) {
			GtkStyleContext* _tmp25_;
			_tmp25_ = context;
			gtk_style_context_remove_class (_tmp25_, "error");
		}
		gtk_entry_set_icon_from_icon_name ((GtkEntry*) self, GTK_ENTRY_ICON_SECONDARY, NULL);
		result = TRUE;
		_g_object_unref0 (context);
		_g_variant_unref0 (tmp_variant);
		_g_free0 (tmp_text);
		_g_free0 (_tmp4_);
		return result;
	}
	goto __finally0;
	__catch0_g_variant_parse_error:
	{
		GtkStyleContext* context = NULL;
		GtkStyleContext* _tmp26_;
		GtkStyleContext* _tmp27_;
		GtkStyleContext* _tmp28_;
		g_clear_error (&_inner_error0_);
		_tmp26_ = gtk_widget_get_style_context ((GtkWidget*) self);
		_tmp27_ = _g_object_ref0 (_tmp26_);
		context = _tmp27_;
		_tmp28_ = context;
		if (!gtk_style_context_has_class (_tmp28_, "error")) {
			GtkStyleContext* _tmp29_;
			_tmp29_ = context;
			gtk_style_context_add_class (_tmp29_, "error");
		}
		g_object_set ((GtkEntry*) self, "secondary-icon-name", "dialog-error-symbolic", NULL);
		result = FALSE;
		_g_object_unref0 (context);
		_g_free0 (tmp_text);
		_g_free0 (_tmp4_);
		return result;
	}
	__finally0:
	_g_free0 (tmp_text);
	_g_free0 (_tmp4_);
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
	g_clear_error (&_inner_error0_);
	return _tmp30_;
}

static GVariant*
key_editor_child_default_real_get_variant (KeyEditorChild* base)
{
	KeyEditorChildDefault * self;
	GVariant* _tmp0_;
	GVariant* _tmp1_;
	GVariant* result;
	self = (KeyEditorChildDefault*) base;
	_tmp0_ = self->priv->variant;
	_tmp1_ = _g_variant_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}

static void
key_editor_child_default_real_reload (KeyEditorChild* base,
                                      GVariant* gvariant)
{
	KeyEditorChildDefault * self;
	GtkEntryBuffer* _tmp0_;
	GtkEntryBuffer* _tmp1_;
	gchar* _tmp2_ = NULL;
	GtkEntryBuffer* _tmp6_;
	GtkEntryBuffer* _tmp7_;
	self = (KeyEditorChildDefault*) base;
	g_return_if_fail (gvariant != NULL);
	_tmp0_ = gtk_entry_get_buffer ((GtkEntry*) self);
	_tmp1_ = _tmp0_;
	key_editor_child_set_lock_on ((GObject*) _tmp1_, self->priv->deleted_text_handler, self->priv->inserted_text_handler);
	if (self->priv->is_string) {
		const gchar* _tmp3_;
		gchar* _tmp4_;
		_tmp3_ = g_variant_get_string (gvariant, NULL);
		_tmp4_ = g_strdup (_tmp3_);
		_g_free0 (_tmp2_);
		_tmp2_ = _tmp4_;
	} else {
		gchar* _tmp5_;
		_tmp5_ = g_variant_print (gvariant, FALSE);
		_g_free0 (_tmp2_);
		_tmp2_ = _tmp5_;
	}
	gtk_entry_set_text ((GtkEntry*) self, _tmp2_);
	if (!key_editor_child_default_test_value (self)) {
		g_assert_not_reached ();
	}
	_tmp6_ = gtk_entry_get_buffer ((GtkEntry*) self);
	_tmp7_ = _tmp6_;
	key_editor_child_set_lock_off ((GObject*) _tmp7_, self->priv->deleted_text_handler, self->priv->inserted_text_handler);
	_g_free0 (_tmp2_);
}

static GObject *
key_editor_child_default_constructor (GType type,
                                      guint n_construct_properties,
                                      GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	KeyEditorChildDefault * self;
	GtkStyleContext* _tmp0_;
	parent_class = G_OBJECT_CLASS (key_editor_child_default_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_KEY_EDITOR_CHILD_DEFAULT, KeyEditorChildDefault);
	_tmp0_ = gtk_widget_get_style_context ((GtkWidget*) self);
	gtk_style_context_add_class (_tmp0_, "key-editor-child-entry");
	return obj;
}

static void
key_editor_child_default_class_init (KeyEditorChildDefaultClass * klass,
                                     gpointer klass_data)
{
	key_editor_child_default_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &KeyEditorChildDefault_private_offset);
	G_OBJECT_CLASS (klass)->constructor = key_editor_child_default_constructor;
	G_OBJECT_CLASS (klass)->finalize = key_editor_child_default_finalize;
}

static void
key_editor_child_default_key_editor_child_interface_init (KeyEditorChildIface * iface,
                                                          gpointer iface_data)
{
	key_editor_child_default_key_editor_child_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_variant = (GVariant* (*) (KeyEditorChild*)) key_editor_child_default_real_get_variant;
	iface->reload = (void (*) (KeyEditorChild*, GVariant*)) key_editor_child_default_real_reload;
}

static void
key_editor_child_default_instance_init (KeyEditorChildDefault * self,
                                        gpointer klass)
{
	self->priv = key_editor_child_default_get_instance_private (self);
	self->priv->deleted_text_handler = (gulong) 0;
	self->priv->inserted_text_handler = (gulong) 0;
}

static void
key_editor_child_default_finalize (GObject * obj)
{
	KeyEditorChildDefault * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_KEY_EDITOR_CHILD_DEFAULT, KeyEditorChildDefault);
	_g_free0 (self->priv->key_type);
	_g_variant_unref0 (self->priv->variant);
	G_OBJECT_CLASS (key_editor_child_default_parent_class)->finalize (obj);
}

static GType
key_editor_child_default_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (KeyEditorChildDefaultClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) key_editor_child_default_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (KeyEditorChildDefault), 0, (GInstanceInitFunc) key_editor_child_default_instance_init, NULL };
	static const GInterfaceInfo key_editor_child_info = { (GInterfaceInitFunc) key_editor_child_default_key_editor_child_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType key_editor_child_default_type_id;
	key_editor_child_default_type_id = g_type_register_static (gtk_entry_get_type (), "KeyEditorChildDefault", &g_define_type_info, 0);
	g_type_add_interface_static (key_editor_child_default_type_id, TYPE_KEY_EDITOR_CHILD, &key_editor_child_info);
	KeyEditorChildDefault_private_offset = g_type_add_instance_private (key_editor_child_default_type_id, sizeof (KeyEditorChildDefaultPrivate));
	return key_editor_child_default_type_id;
}

GType
key_editor_child_default_get_type (void)
{
	static volatile gsize key_editor_child_default_type_id__once = 0;
	if (g_once_init_enter (&key_editor_child_default_type_id__once)) {
		GType key_editor_child_default_type_id;
		key_editor_child_default_type_id = key_editor_child_default_get_type_once ();
		g_once_init_leave (&key_editor_child_default_type_id__once, key_editor_child_default_type_id);
	}
	return key_editor_child_default_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;
}

