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

#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gee.h>
#include <gobject/gvaluecollector.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define PDFPC_TYPE_OPTIONS (pdfpc_options_get_type ())
#define PDFPC_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PDFPC_TYPE_OPTIONS, pdfpcOptions))
#define PDFPC_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PDFPC_TYPE_OPTIONS, pdfpcOptionsClass))
#define PDFPC_IS_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PDFPC_TYPE_OPTIONS))
#define PDFPC_IS_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PDFPC_TYPE_OPTIONS))
#define PDFPC_OPTIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PDFPC_TYPE_OPTIONS, pdfpcOptionsClass))

typedef struct _pdfpcOptions pdfpcOptions;
typedef struct _pdfpcOptionsClass pdfpcOptionsClass;
typedef struct _pdfpcOptionsPrivate pdfpcOptionsPrivate;
enum  {
	PDFPC_OPTIONS_0_PROPERTY,
	PDFPC_OPTIONS_NUM_PROPERTIES
};
static GParamSpec* pdfpc_options_properties[PDFPC_OPTIONS_NUM_PROPERTIES];
typedef enum  {
	PDFPC_OPTIONS_TOOLBOX_DIRECTION_LtoR,
	PDFPC_OPTIONS_TOOLBOX_DIRECTION_RtoL,
	PDFPC_OPTIONS_TOOLBOX_DIRECTION_TtoB,
	PDFPC_OPTIONS_TOOLBOX_DIRECTION_BtoT
} pdfpcOptionsToolboxDirection;

#define PDFPC_OPTIONS_TYPE_TOOLBOX_DIRECTION (pdfpc_options_toolbox_direction_get_type ())

#define PDFPC_OPTIONS_TYPE_BIND_TUPLE (pdfpc_options_bind_tuple_get_type ())
#define PDFPC_OPTIONS_BIND_TUPLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PDFPC_OPTIONS_TYPE_BIND_TUPLE, pdfpcOptionsBindTuple))
#define PDFPC_OPTIONS_BIND_TUPLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PDFPC_OPTIONS_TYPE_BIND_TUPLE, pdfpcOptionsBindTupleClass))
#define PDFPC_OPTIONS_IS_BIND_TUPLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PDFPC_OPTIONS_TYPE_BIND_TUPLE))
#define PDFPC_OPTIONS_IS_BIND_TUPLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PDFPC_OPTIONS_TYPE_BIND_TUPLE))
#define PDFPC_OPTIONS_BIND_TUPLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PDFPC_OPTIONS_TYPE_BIND_TUPLE, pdfpcOptionsBindTupleClass))

typedef struct _pdfpcOptionsBindTuple pdfpcOptionsBindTuple;
typedef struct _pdfpcOptionsBindTupleClass pdfpcOptionsBindTupleClass;
typedef struct _pdfpcOptionsBindTuplePrivate pdfpcOptionsBindTuplePrivate;
#define _g_free0(var) (var = (g_free (var), NULL))

#define PDFPC_TYPE_CONFIG_FILE_ERROR (pdfpc_config_file_error_get_type ())
typedef struct _pdfpcOptionsParamSpecBindTuple pdfpcOptionsParamSpecBindTuple;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _pdfpcOptions {
	GObject parent_instance;
	pdfpcOptionsPrivate * priv;
};

struct _pdfpcOptionsClass {
	GObjectClass parent_class;
};

struct _pdfpcOptionsBindTuple {
	GTypeInstance parent_instance;
	volatile int ref_count;
	pdfpcOptionsBindTuplePrivate * priv;
	gchar* type;
	guint keyCode;
	guint modMask;
	gchar* actionName;
};

struct _pdfpcOptionsBindTupleClass {
	GTypeClass parent_class;
	void (*finalize) (pdfpcOptionsBindTuple *self);
};

struct _pdfpcOptionsBindTuplePrivate {
	gchar* _actionArg;
};

typedef enum  {
	PDFPC_CONFIG_FILE_ERROR_INVALID_BIND
} pdfpcConfigFileError;
#define PDFPC_CONFIG_FILE_ERROR pdfpc_config_file_error_quark ()

struct _pdfpcOptionsParamSpecBindTuple {
	GParamSpec parent_instance;
};

static gpointer pdfpc_options_parent_class = NULL;
VALA_EXTERN gchar* pdfpc_options_external_script;
gchar* pdfpc_options_external_script = NULL;
VALA_EXTERN gboolean pdfpc_options_display_switch;
gboolean pdfpc_options_display_switch = FALSE;
VALA_EXTERN gboolean pdfpc_options_single_screen;
gboolean pdfpc_options_single_screen = FALSE;
VALA_EXTERN gchar* pdfpc_options_windowed;
gchar* pdfpc_options_windowed = NULL;
VALA_EXTERN gboolean pdfpc_options_wayland_workaround;
gboolean pdfpc_options_wayland_workaround = FALSE;
VALA_EXTERN gboolean pdfpc_options_cache_debug;
gboolean pdfpc_options_cache_debug = FALSE;
VALA_EXTERN gint pdfpc_options_cache_clean_period;
gint pdfpc_options_cache_clean_period = 60;
VALA_EXTERN gint pdfpc_options_cache_expiration;
gint pdfpc_options_cache_expiration = 600;
VALA_EXTERN gint pdfpc_options_cache_max_rtime;
gint pdfpc_options_cache_max_rtime = 1000;
VALA_EXTERN gint pdfpc_options_cache_min_rtime;
gint pdfpc_options_cache_min_rtime = 10;
VALA_EXTERN gint pdfpc_options_cache_max_usize;
gint pdfpc_options_cache_max_usize = 256;
VALA_EXTERN gint pdfpc_options_prerender_delay;
gint pdfpc_options_prerender_delay = 4;
VALA_EXTERN gint pdfpc_options_prerender_slides;
gint pdfpc_options_prerender_slides = 2;
VALA_EXTERN gint pdfpc_options_cursor_timeout;
gint pdfpc_options_cursor_timeout = 2;
VALA_EXTERN gboolean pdfpc_options_move_on_mapped;
gboolean pdfpc_options_move_on_mapped = FALSE;
VALA_EXTERN gboolean pdfpc_options_disable_input_autodetection;
gboolean pdfpc_options_disable_input_autodetection = FALSE;
VALA_EXTERN gboolean pdfpc_options_disable_input_pressure;
gboolean pdfpc_options_disable_input_pressure = FALSE;
VALA_EXTERN gboolean pdfpc_options_disable_scrolling;
gboolean pdfpc_options_disable_scrolling = FALSE;
VALA_EXTERN gboolean pdfpc_options_disable_tooltips;
gboolean pdfpc_options_disable_tooltips = FALSE;
VALA_EXTERN gboolean pdfpc_options_disable_auto_grouping;
gboolean pdfpc_options_disable_auto_grouping = FALSE;
VALA_EXTERN guint pdfpc_options_duration;
guint pdfpc_options_duration = (guint) 0;
VALA_EXTERN guint pdfpc_options_last_minutes;
guint pdfpc_options_last_minutes = (guint) 0;
VALA_EXTERN guint pdfpc_options_status_height;
guint pdfpc_options_status_height = (guint) 10;
VALA_EXTERN guint pdfpc_options_current_size;
guint pdfpc_options_current_size = (guint) 60;
VALA_EXTERN guint pdfpc_options_current_height;
guint pdfpc_options_current_height = (guint) 80;
VALA_EXTERN guint pdfpc_options_next_height;
guint pdfpc_options_next_height = (guint) 70;
VALA_EXTERN gboolean pdfpc_options_maximize_in_drawing;
gboolean pdfpc_options_maximize_in_drawing = FALSE;
VALA_EXTERN gint pdfpc_options_min_overview_width;
gint pdfpc_options_min_overview_width = 150;
VALA_EXTERN gchar* pdfpc_options_start_time;
gchar* pdfpc_options_start_time = NULL;
VALA_EXTERN gboolean pdfpc_options_use_time_of_day;
gboolean pdfpc_options_use_time_of_day = FALSE;
VALA_EXTERN gboolean pdfpc_options_timer_pace_color;
gboolean pdfpc_options_timer_pace_color = TRUE;
VALA_EXTERN gchar* pdfpc_options_end_time;
gchar* pdfpc_options_end_time = NULL;
VALA_EXTERN gboolean pdfpc_options_black_on_end;
gboolean pdfpc_options_black_on_end = FALSE;
VALA_EXTERN gboolean pdfpc_options_list_bindings;
gboolean pdfpc_options_list_bindings = FALSE;
VALA_EXTERN gchar* pdfpc_options_notes_format;
gchar* pdfpc_options_notes_format = NULL;
VALA_EXTERN gchar* pdfpc_options_notes_position;
gchar* pdfpc_options_notes_position = NULL;
VALA_EXTERN gboolean pdfpc_options_presentation_interactive;
gboolean pdfpc_options_presentation_interactive = FALSE;
VALA_EXTERN gchar* pdfpc_options_presentation_screen;
gchar* pdfpc_options_presentation_screen = NULL;
VALA_EXTERN gchar* pdfpc_options_presenter_screen;
gchar* pdfpc_options_presenter_screen = NULL;
VALA_EXTERN gchar* pdfpc_options_size;
gchar* pdfpc_options_size = NULL;
VALA_EXTERN gchar* pdfpc_options_pointer_color;
gchar* pdfpc_options_pointer_color = NULL;
VALA_EXTERN gint pdfpc_options_pointer_opacity;
gint pdfpc_options_pointer_opacity = 50;
VALA_EXTERN guint pdfpc_options_pointer_size;
guint pdfpc_options_pointer_size = (guint) 10;
VALA_EXTERN gint pdfpc_options_spotlight_opacity;
gint pdfpc_options_spotlight_opacity = 50;
VALA_EXTERN guint pdfpc_options_spotlight_size;
guint pdfpc_options_spotlight_size = (guint) 100;
VALA_EXTERN gboolean pdfpc_options_auto_srt;
gboolean pdfpc_options_auto_srt = FALSE;
VALA_EXTERN gchar* pdfpc_options_pdfpc_location;
gchar* pdfpc_options_pdfpc_location = NULL;
VALA_EXTERN gboolean pdfpc_options_no_install;
gboolean pdfpc_options_no_install = FALSE;
VALA_EXTERN guint pdfpc_options_transition_fps;
guint pdfpc_options_transition_fps = (guint) 25;
VALA_EXTERN gchar* pdfpc_options_default_transition;
gchar* pdfpc_options_default_transition = NULL;
VALA_EXTERN gboolean pdfpc_options_final_slide_overlay;
gboolean pdfpc_options_final_slide_overlay = FALSE;
VALA_EXTERN gboolean pdfpc_options_next_slide_first_overlay;
gboolean pdfpc_options_next_slide_first_overlay = FALSE;
VALA_EXTERN gboolean pdfpc_options_enable_rest;
gboolean pdfpc_options_enable_rest = FALSE;
VALA_EXTERN gint pdfpc_options_rest_port;
gint pdfpc_options_rest_port = 0;
VALA_EXTERN gboolean pdfpc_options_rest_https;
gboolean pdfpc_options_rest_https = FALSE;
VALA_EXTERN gchar* pdfpc_options_rest_passwd;
gchar* pdfpc_options_rest_passwd = NULL;
VALA_EXTERN gchar* pdfpc_options_rest_static_root;
gchar* pdfpc_options_rest_static_root = NULL;
VALA_EXTERN GeeList* pdfpc_options_key_bindings;
GeeList* pdfpc_options_key_bindings = NULL;
VALA_EXTERN GeeList* pdfpc_options_mouse_bindings;
GeeList* pdfpc_options_mouse_bindings = NULL;
VALA_EXTERN pdfpcOptionsToolboxDirection pdfpc_options_toolbox_direction;
pdfpcOptionsToolboxDirection pdfpc_options_toolbox_direction = PDFPC_OPTIONS_TOOLBOX_DIRECTION_LtoR;
VALA_EXTERN gboolean pdfpc_options_toolbox_shown;
gboolean pdfpc_options_toolbox_shown = FALSE;
VALA_EXTERN gboolean pdfpc_options_toolbox_minimized;
gboolean pdfpc_options_toolbox_minimized = FALSE;
static gint pdfpcOptionsBindTuple_private_offset;
static gpointer pdfpc_options_bind_tuple_parent_class = NULL;

VALA_EXTERN GType pdfpc_options_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (pdfpcOptions, g_object_unref)
VALA_EXTERN GType pdfpc_options_toolbox_direction_get_type (void) G_GNUC_CONST ;
VALA_EXTERN pdfpcOptionsToolboxDirection pdfpc_options_toolbox_direction_parse (const gchar* dir);
VALA_EXTERN gpointer pdfpc_options_bind_tuple_ref (gpointer instance);
VALA_EXTERN void pdfpc_options_bind_tuple_unref (gpointer instance);
VALA_EXTERN GParamSpec* pdfpc_options_param_spec_bind_tuple (const gchar* name,
                                                 const gchar* nick,
                                                 const gchar* blurb,
                                                 GType object_type,
                                                 GParamFlags flags);
VALA_EXTERN void pdfpc_options_value_set_bind_tuple (GValue* value,
                                         gpointer v_object);
VALA_EXTERN void pdfpc_options_value_take_bind_tuple (GValue* value,
                                          gpointer v_object);
VALA_EXTERN gpointer pdfpc_options_value_get_bind_tuple (const GValue* value);
VALA_EXTERN GType pdfpc_options_bind_tuple_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (pdfpcOptionsBindTuple, pdfpc_options_bind_tuple_unref)
VALA_EXTERN pdfpcOptions* pdfpc_options_new (void);
VALA_EXTERN pdfpcOptions* pdfpc_options_construct (GType object_type);
VALA_EXTERN GQuark pdfpc_config_file_error_quark (void);
VALA_EXTERN GType pdfpc_config_file_error_get_type (void) G_GNUC_CONST ;
VALA_EXTERN void pdfpc_options_bind_tuple_setActionArg (pdfpcOptionsBindTuple* self,
                                            const gchar* actionArg,
                                            GError** error);
VALA_EXTERN pdfpcOptionsBindTuple* pdfpc_options_bind_tuple_new (void);
VALA_EXTERN pdfpcOptionsBindTuple* pdfpc_options_bind_tuple_construct (GType object_type);
VALA_EXTERN const gchar* pdfpc_options_bind_tuple_get_actionArg (pdfpcOptionsBindTuple* self);
static void pdfpc_options_bind_tuple_finalize (pdfpcOptionsBindTuple * obj);
static GType pdfpc_options_bind_tuple_get_type_once (void);
static void pdfpc_options_finalize (GObject * obj);
static GType pdfpc_options_get_type_once (void);

/**
         * Defines direction/orientation of the toolbox
         */
pdfpcOptionsToolboxDirection
pdfpc_options_toolbox_direction_parse (const gchar* dir)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	GQuark _tmp3_ = 0U;
	static GQuark _tmp2_label0 = 0;
	static GQuark _tmp2_label1 = 0;
	static GQuark _tmp2_label2 = 0;
	static GQuark _tmp2_label3 = 0;
	pdfpcOptionsToolboxDirection result;
	if (dir == NULL) {
		result = PDFPC_OPTIONS_TOOLBOX_DIRECTION_LtoR;
		return result;
	}
	_tmp0_ = g_utf8_strdown (dir, (gssize) -1);
	_tmp1_ = _tmp0_;
	_tmp3_ = (NULL == _tmp1_) ? 0 : g_quark_from_string (_tmp1_);
	g_free (_tmp1_);
	if (_tmp3_ == ((0 != _tmp2_label0) ? _tmp2_label0 : (_tmp2_label0 = g_quark_from_static_string ("ltor")))) {
		switch (0) {
			default:
			{
				result = PDFPC_OPTIONS_TOOLBOX_DIRECTION_LtoR;
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label1) ? _tmp2_label1 : (_tmp2_label1 = g_quark_from_static_string ("rtol")))) {
		switch (0) {
			default:
			{
				result = PDFPC_OPTIONS_TOOLBOX_DIRECTION_RtoL;
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label2) ? _tmp2_label2 : (_tmp2_label2 = g_quark_from_static_string ("ttob")))) {
		switch (0) {
			default:
			{
				result = PDFPC_OPTIONS_TOOLBOX_DIRECTION_TtoB;
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label3) ? _tmp2_label3 : (_tmp2_label3 = g_quark_from_static_string ("btot")))) {
		switch (0) {
			default:
			{
				result = PDFPC_OPTIONS_TOOLBOX_DIRECTION_BtoT;
				return result;
			}
		}
	} else {
		switch (0) {
			default:
			{
				result = PDFPC_OPTIONS_TOOLBOX_DIRECTION_LtoR;
				return result;
			}
		}
	}
}

static GType
pdfpc_options_toolbox_direction_get_type_once (void)
{
	static const GEnumValue values[] = {{PDFPC_OPTIONS_TOOLBOX_DIRECTION_LtoR, "PDFPC_OPTIONS_TOOLBOX_DIRECTION_LtoR", "ltor"}, {PDFPC_OPTIONS_TOOLBOX_DIRECTION_RtoL, "PDFPC_OPTIONS_TOOLBOX_DIRECTION_RtoL", "rtol"}, {PDFPC_OPTIONS_TOOLBOX_DIRECTION_TtoB, "PDFPC_OPTIONS_TOOLBOX_DIRECTION_TtoB", "ttob"}, {PDFPC_OPTIONS_TOOLBOX_DIRECTION_BtoT, "PDFPC_OPTIONS_TOOLBOX_DIRECTION_BtoT", "btot"}, {0, NULL, NULL}};
	GType pdfpc_options_toolbox_direction_type_id;
	pdfpc_options_toolbox_direction_type_id = g_enum_register_static ("pdfpcOptionsToolboxDirection", values);
	return pdfpc_options_toolbox_direction_type_id;
}

GType
pdfpc_options_toolbox_direction_get_type (void)
{
	static volatile gsize pdfpc_options_toolbox_direction_type_id__once = 0;
	if (g_once_init_enter (&pdfpc_options_toolbox_direction_type_id__once)) {
		GType pdfpc_options_toolbox_direction_type_id;
		pdfpc_options_toolbox_direction_type_id = pdfpc_options_toolbox_direction_get_type_once ();
		g_once_init_leave (&pdfpc_options_toolbox_direction_type_id__once, pdfpc_options_toolbox_direction_type_id);
	}
	return pdfpc_options_toolbox_direction_type_id__once;
}

pdfpcOptions*
pdfpc_options_construct (GType object_type)
{
	pdfpcOptions * self = NULL;
	self = (pdfpcOptions*) g_object_new (object_type, NULL);
	return self;
}

pdfpcOptions*
pdfpc_options_new (void)
{
	return pdfpc_options_construct (PDFPC_TYPE_OPTIONS);
}

static inline gpointer
pdfpc_options_bind_tuple_get_instance_private (pdfpcOptionsBindTuple* self)
{
	return G_STRUCT_MEMBER_P (self, pdfpcOptionsBindTuple_private_offset);
}

void
pdfpc_options_bind_tuple_setActionArg (pdfpcOptionsBindTuple* self,
                                       const gchar* actionArg,
                                       GError** error)
{
	gboolean _tmp0_ = FALSE;
	const gchar* _tmp1_;
	gchar* _tmp4_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->actionName;
	if (g_strcmp0 (_tmp1_, "setPenColor") != 0) {
		const gchar* _tmp2_;
		_tmp2_ = self->actionName;
		_tmp0_ = g_strcmp0 (_tmp2_, "switchMode") != 0;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GError* _tmp3_;
		_tmp3_ = g_error_new_literal (PDFPC_CONFIG_FILE_ERROR, PDFPC_CONFIG_FILE_ERROR_INVALID_BIND, "Only 'setPenColor' accepts an action argument");
		_inner_error0_ = _tmp3_;
		if (_inner_error0_->domain == PDFPC_CONFIG_FILE_ERROR) {
			g_propagate_error (error, _inner_error0_);
			return;
		} else {
			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;
		}
	}
	_tmp4_ = g_strdup (actionArg);
	_g_free0 (self->priv->_actionArg);
	self->priv->_actionArg = _tmp4_;
}

pdfpcOptionsBindTuple*
pdfpc_options_bind_tuple_construct (GType object_type)
{
	pdfpcOptionsBindTuple* self = NULL;
	self = (pdfpcOptionsBindTuple*) g_type_create_instance (object_type);
	return self;
}

pdfpcOptionsBindTuple*
pdfpc_options_bind_tuple_new (void)
{
	return pdfpc_options_bind_tuple_construct (PDFPC_OPTIONS_TYPE_BIND_TUPLE);
}

const gchar*
pdfpc_options_bind_tuple_get_actionArg (pdfpcOptionsBindTuple* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_actionArg;
	result = _tmp0_;
	return result;
}

static void
pdfpc_options_value_bind_tuple_init (GValue* value)
{
	value->data[0].v_pointer = NULL;
}

static void
pdfpc_options_value_bind_tuple_free_value (GValue* value)
{
	if (value->data[0].v_pointer) {
		pdfpc_options_bind_tuple_unref (value->data[0].v_pointer);
	}
}

static void
pdfpc_options_value_bind_tuple_copy_value (const GValue* src_value,
                                           GValue* dest_value)
{
	if (src_value->data[0].v_pointer) {
		dest_value->data[0].v_pointer = pdfpc_options_bind_tuple_ref (src_value->data[0].v_pointer);
	} else {
		dest_value->data[0].v_pointer = NULL;
	}
}

static gpointer
pdfpc_options_value_bind_tuple_peek_pointer (const GValue* value)
{
	return value->data[0].v_pointer;
}

static gchar*
pdfpc_options_value_bind_tuple_collect_value (GValue* value,
                                              guint n_collect_values,
                                              GTypeCValue* collect_values,
                                              guint collect_flags)
{
	if (collect_values[0].v_pointer) {
		pdfpcOptionsBindTuple * object;
		object = collect_values[0].v_pointer;
		if (object->parent_instance.g_class == NULL) {
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		}
		value->data[0].v_pointer = pdfpc_options_bind_tuple_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}

static gchar*
pdfpc_options_value_bind_tuple_lcopy_value (const GValue* value,
                                            guint n_collect_values,
                                            GTypeCValue* collect_values,
                                            guint collect_flags)
{
	pdfpcOptionsBindTuple ** object_p;
	object_p = collect_values[0].v_pointer;
	if (!object_p) {
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
	}
	if (!value->data[0].v_pointer) {
		*object_p = NULL;
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
		*object_p = value->data[0].v_pointer;
	} else {
		*object_p = pdfpc_options_bind_tuple_ref (value->data[0].v_pointer);
	}
	return NULL;
}

GParamSpec*
pdfpc_options_param_spec_bind_tuple (const gchar* name,
                                     const gchar* nick,
                                     const gchar* blurb,
                                     GType object_type,
                                     GParamFlags flags)
{
	pdfpcOptionsParamSpecBindTuple* spec;
	g_return_val_if_fail (g_type_is_a (object_type, PDFPC_OPTIONS_TYPE_BIND_TUPLE), NULL);
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
	G_PARAM_SPEC (spec)->value_type = object_type;
	return G_PARAM_SPEC (spec);
}

gpointer
pdfpc_options_value_get_bind_tuple (const GValue* value)
{
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PDFPC_OPTIONS_TYPE_BIND_TUPLE), NULL);
	return value->data[0].v_pointer;
}

void
pdfpc_options_value_set_bind_tuple (GValue* value,
                                    gpointer v_object)
{
	pdfpcOptionsBindTuple * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PDFPC_OPTIONS_TYPE_BIND_TUPLE));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PDFPC_OPTIONS_TYPE_BIND_TUPLE));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
		pdfpc_options_bind_tuple_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		pdfpc_options_bind_tuple_unref (old);
	}
}

void
pdfpc_options_value_take_bind_tuple (GValue* value,
                                     gpointer v_object)
{
	pdfpcOptionsBindTuple * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PDFPC_OPTIONS_TYPE_BIND_TUPLE));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PDFPC_OPTIONS_TYPE_BIND_TUPLE));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		pdfpc_options_bind_tuple_unref (old);
	}
}

static void
pdfpc_options_bind_tuple_class_init (pdfpcOptionsBindTupleClass * klass,
                                     gpointer klass_data)
{
	pdfpc_options_bind_tuple_parent_class = g_type_class_peek_parent (klass);
	((pdfpcOptionsBindTupleClass *) klass)->finalize = pdfpc_options_bind_tuple_finalize;
	g_type_class_adjust_private_offset (klass, &pdfpcOptionsBindTuple_private_offset);
}

static void
pdfpc_options_bind_tuple_instance_init (pdfpcOptionsBindTuple * self,
                                        gpointer klass)
{
	self->priv = pdfpc_options_bind_tuple_get_instance_private (self);
	self->ref_count = 1;
}

static void
pdfpc_options_bind_tuple_finalize (pdfpcOptionsBindTuple * obj)
{
	pdfpcOptionsBindTuple * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PDFPC_OPTIONS_TYPE_BIND_TUPLE, pdfpcOptionsBindTuple);
	g_signal_handlers_destroy (self);
	_g_free0 (self->type);
	_g_free0 (self->actionName);
	_g_free0 (self->priv->_actionArg);
}

static GType
pdfpc_options_bind_tuple_get_type_once (void)
{
	static const GTypeValueTable g_define_type_value_table = { pdfpc_options_value_bind_tuple_init, pdfpc_options_value_bind_tuple_free_value, pdfpc_options_value_bind_tuple_copy_value, pdfpc_options_value_bind_tuple_peek_pointer, "p", pdfpc_options_value_bind_tuple_collect_value, "p", pdfpc_options_value_bind_tuple_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (pdfpcOptionsBindTupleClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) pdfpc_options_bind_tuple_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (pdfpcOptionsBindTuple), 0, (GInstanceInitFunc) pdfpc_options_bind_tuple_instance_init, &g_define_type_value_table };
	static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
	GType pdfpc_options_bind_tuple_type_id;
	pdfpc_options_bind_tuple_type_id = g_type_register_fundamental (g_type_fundamental_next (), "pdfpcOptionsBindTuple", &g_define_type_info, &g_define_type_fundamental_info, 0);
	pdfpcOptionsBindTuple_private_offset = g_type_add_instance_private (pdfpc_options_bind_tuple_type_id, sizeof (pdfpcOptionsBindTuplePrivate));
	return pdfpc_options_bind_tuple_type_id;
}

GType
pdfpc_options_bind_tuple_get_type (void)
{
	static volatile gsize pdfpc_options_bind_tuple_type_id__once = 0;
	if (g_once_init_enter (&pdfpc_options_bind_tuple_type_id__once)) {
		GType pdfpc_options_bind_tuple_type_id;
		pdfpc_options_bind_tuple_type_id = pdfpc_options_bind_tuple_get_type_once ();
		g_once_init_leave (&pdfpc_options_bind_tuple_type_id__once, pdfpc_options_bind_tuple_type_id);
	}
	return pdfpc_options_bind_tuple_type_id__once;
}

gpointer
pdfpc_options_bind_tuple_ref (gpointer instance)
{
	pdfpcOptionsBindTuple * self;
	self = instance;
	g_atomic_int_inc (&self->ref_count);
	return instance;
}

void
pdfpc_options_bind_tuple_unref (gpointer instance)
{
	pdfpcOptionsBindTuple * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		PDFPC_OPTIONS_BIND_TUPLE_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}

static void
pdfpc_options_class_init (pdfpcOptionsClass * klass,
                          gpointer klass_data)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	GeeArrayList* _tmp3_;
	GeeArrayList* _tmp4_;
	pdfpc_options_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = pdfpc_options_finalize;
	_tmp0_ = g_strdup ("none");
	pdfpc_options_external_script = _tmp0_;
	_tmp1_ = g_strdup ("red");
	pdfpc_options_pointer_color = _tmp1_;
	_tmp2_ = g_strdup ("www");
	pdfpc_options_rest_static_root = _tmp2_;
	_tmp3_ = gee_array_list_new (PDFPC_OPTIONS_TYPE_BIND_TUPLE, (GBoxedCopyFunc) pdfpc_options_bind_tuple_ref, (GDestroyNotify) pdfpc_options_bind_tuple_unref, NULL, NULL, NULL);
	_g_object_unref0 (pdfpc_options_key_bindings);
	pdfpc_options_key_bindings = (GeeList*) _tmp3_;
	_tmp4_ = gee_array_list_new (PDFPC_OPTIONS_TYPE_BIND_TUPLE, (GBoxedCopyFunc) pdfpc_options_bind_tuple_ref, (GDestroyNotify) pdfpc_options_bind_tuple_unref, NULL, NULL, NULL);
	_g_object_unref0 (pdfpc_options_mouse_bindings);
	pdfpc_options_mouse_bindings = (GeeList*) _tmp4_;
}

static void
pdfpc_options_instance_init (pdfpcOptions * self,
                             gpointer klass)
{
}

static void
pdfpc_options_finalize (GObject * obj)
{
	pdfpcOptions * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PDFPC_TYPE_OPTIONS, pdfpcOptions);
	G_OBJECT_CLASS (pdfpc_options_parent_class)->finalize (obj);
}

/**
     * Static property container holding the application wide option
     * information and their default values.
     */
static GType
pdfpc_options_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (pdfpcOptionsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) pdfpc_options_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (pdfpcOptions), 0, (GInstanceInitFunc) pdfpc_options_instance_init, NULL };
	GType pdfpc_options_type_id;
	pdfpc_options_type_id = g_type_register_static (G_TYPE_OBJECT, "pdfpcOptions", &g_define_type_info, 0);
	return pdfpc_options_type_id;
}

GType
pdfpc_options_get_type (void)
{
	static volatile gsize pdfpc_options_type_id__once = 0;
	if (g_once_init_enter (&pdfpc_options_type_id__once)) {
		GType pdfpc_options_type_id;
		pdfpc_options_type_id = pdfpc_options_get_type_once ();
		g_once_init_leave (&pdfpc_options_type_id__once, pdfpc_options_type_id);
	}
	return pdfpc_options_type_id__once;
}

