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

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <gdk/gdk.h>
#include <gee.h>
#include <gio/gio.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_CONFIG_FILE_ERROR (pdfpc_config_file_error_get_type ())

#define PDFPC_TYPE_CONFIG_FILE_READER (pdfpc_config_file_reader_get_type ())
#define PDFPC_CONFIG_FILE_READER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PDFPC_TYPE_CONFIG_FILE_READER, pdfpcConfigFileReader))
#define PDFPC_CONFIG_FILE_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PDFPC_TYPE_CONFIG_FILE_READER, pdfpcConfigFileReaderClass))
#define PDFPC_IS_CONFIG_FILE_READER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PDFPC_TYPE_CONFIG_FILE_READER))
#define PDFPC_IS_CONFIG_FILE_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PDFPC_TYPE_CONFIG_FILE_READER))
#define PDFPC_CONFIG_FILE_READER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PDFPC_TYPE_CONFIG_FILE_READER, pdfpcConfigFileReaderClass))

typedef struct _pdfpcConfigFileReader pdfpcConfigFileReader;
typedef struct _pdfpcConfigFileReaderClass pdfpcConfigFileReaderClass;
typedef struct _pdfpcConfigFileReaderPrivate pdfpcConfigFileReaderPrivate;
typedef guint (*pdfpcConfigFileReaderbinding2uint) (const gchar* a, gpointer user_data);
#define _g_free0(var) (var = (g_free (var), NULL))

#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;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _pdfpcOptionsBindTuplePrivate pdfpcOptionsBindTuplePrivate;
#define _pdfpc_options_bind_tuple_unref0(var) ((var == NULL) ? NULL : (var = (pdfpc_options_bind_tuple_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
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 ())
typedef struct _pdfpcParamSpecConfigFileReader pdfpcParamSpecConfigFileReader;

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

struct _pdfpcConfigFileReader {
	GTypeInstance parent_instance;
	volatile int ref_count;
	pdfpcConfigFileReaderPrivate * priv;
};

struct _pdfpcConfigFileReaderClass {
	GTypeClass parent_class;
	void (*finalize) (pdfpcConfigFileReader *self);
};

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 _pdfpcParamSpecConfigFileReader {
	GParamSpec parent_instance;
};

static gpointer pdfpc_config_file_reader_parent_class = NULL;
VALA_EXTERN GeeList* pdfpc_options_mouse_bindings;
VALA_EXTERN GeeList* pdfpc_options_key_bindings;
VALA_EXTERN gboolean pdfpc_options_black_on_end;
VALA_EXTERN gboolean pdfpc_options_cache_debug;
VALA_EXTERN gint pdfpc_options_cache_clean_period;
VALA_EXTERN gint pdfpc_options_cache_expiration;
VALA_EXTERN gint pdfpc_options_cache_max_rtime;
VALA_EXTERN gint pdfpc_options_cache_min_rtime;
VALA_EXTERN gint pdfpc_options_cache_max_usize;
VALA_EXTERN guint pdfpc_options_current_height;
VALA_EXTERN guint pdfpc_options_current_size;
VALA_EXTERN gint pdfpc_options_cursor_timeout;
VALA_EXTERN gboolean pdfpc_options_disable_input_autodetection;
VALA_EXTERN gboolean pdfpc_options_disable_input_pressure;
VALA_EXTERN gboolean pdfpc_options_disable_scrolling;
VALA_EXTERN gboolean pdfpc_options_disable_tooltips;
VALA_EXTERN gboolean pdfpc_options_auto_srt;
VALA_EXTERN gboolean pdfpc_options_final_slide_overlay;
VALA_EXTERN gboolean pdfpc_options_maximize_in_drawing;
VALA_EXTERN gboolean pdfpc_options_move_on_mapped;
VALA_EXTERN guint pdfpc_options_next_height;
VALA_EXTERN gboolean pdfpc_options_next_slide_first_overlay;
VALA_EXTERN gint pdfpc_options_min_overview_width;
VALA_EXTERN gchar* pdfpc_options_pointer_color;
VALA_EXTERN gint pdfpc_options_pointer_opacity;
VALA_EXTERN guint pdfpc_options_pointer_size;
VALA_EXTERN gint pdfpc_options_prerender_delay;
VALA_EXTERN gint pdfpc_options_prerender_slides;
VALA_EXTERN gboolean pdfpc_options_presentation_interactive;
VALA_EXTERN gchar* pdfpc_options_presentation_screen;
VALA_EXTERN gchar* pdfpc_options_presenter_screen;
VALA_EXTERN gboolean pdfpc_options_rest_https;
VALA_EXTERN gint pdfpc_options_rest_port;
VALA_EXTERN gchar* pdfpc_options_rest_passwd;
VALA_EXTERN gchar* pdfpc_options_rest_static_root;
VALA_EXTERN gint pdfpc_options_spotlight_opacity;
VALA_EXTERN guint pdfpc_options_spotlight_size;
VALA_EXTERN guint pdfpc_options_status_height;
VALA_EXTERN gboolean pdfpc_options_display_switch;
VALA_EXTERN gboolean pdfpc_options_use_time_of_day;
VALA_EXTERN gboolean pdfpc_options_timer_pace_color;
VALA_EXTERN gboolean pdfpc_options_toolbox_shown;
VALA_EXTERN pdfpcOptionsToolboxDirection pdfpc_options_toolbox_direction;
VALA_EXTERN gboolean pdfpc_options_toolbox_minimized;
VALA_EXTERN guint pdfpc_options_transition_fps;
VALA_EXTERN gchar* pdfpc_options_windowed;

VALA_EXTERN GQuark pdfpc_config_file_error_quark (void);
VALA_EXTERN GType pdfpc_config_file_error_get_type (void) G_GNUC_CONST ;
VALA_EXTERN gpointer pdfpc_config_file_reader_ref (gpointer instance);
VALA_EXTERN void pdfpc_config_file_reader_unref (gpointer instance);
VALA_EXTERN GParamSpec* pdfpc_param_spec_config_file_reader (const gchar* name,
                                                 const gchar* nick,
                                                 const gchar* blurb,
                                                 GType object_type,
                                                 GParamFlags flags);
VALA_EXTERN void pdfpc_value_set_config_file_reader (GValue* value,
                                         gpointer v_object);
VALA_EXTERN void pdfpc_value_take_config_file_reader (GValue* value,
                                          gpointer v_object);
VALA_EXTERN gpointer pdfpc_value_get_config_file_reader (const GValue* value);
VALA_EXTERN GType pdfpc_config_file_reader_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (pdfpcConfigFileReader, pdfpc_config_file_reader_unref)
VALA_EXTERN pdfpcConfigFileReader* pdfpc_config_file_reader_new (void);
VALA_EXTERN pdfpcConfigFileReader* pdfpc_config_file_reader_construct (GType object_type);
static void pdfpc_config_file_reader_readBindDef (pdfpcConfigFileReader* self,
                                           const gchar* name,
                                           pdfpcConfigFileReaderbinding2uint conversor,
                                           gpointer conversor_target,
                                           guint* code,
                                           guint* modMask);
static void pdfpc_config_file_reader_bindKeyOrMouse (pdfpcConfigFileReader* self,
                                              gboolean is_mouse,
                                              const gchar* wholeLine,
                                              gchar** fields,
                                              gint fields_length1);
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)
static guint ___lambda50_ (pdfpcConfigFileReader* self,
                    const gchar* x);
static guint ____lambda50__pdfpc_config_file_readerbinding2uint (const gchar* a,
                                                          gpointer self);
static guint _gdk_keyval_from_name_pdfpc_config_file_readerbinding2uint (const gchar* a,
                                                                  gpointer self);
VALA_EXTERN pdfpcOptionsBindTuple* pdfpc_options_bind_tuple_new (void);
VALA_EXTERN pdfpcOptionsBindTuple* pdfpc_options_bind_tuple_construct (GType object_type);
VALA_EXTERN void pdfpc_options_bind_tuple_setActionArg (pdfpcOptionsBindTuple* self,
                                            const gchar* actionArg,
                                            GError** error);
static void pdfpc_config_file_reader_bindKey (pdfpcConfigFileReader* self,
                                       const gchar* wholeLine,
                                       gchar** fields,
                                       gint fields_length1);
static void pdfpc_config_file_reader_bindMouse (pdfpcConfigFileReader* self,
                                         const gchar* wholeLine,
                                         gchar** fields,
                                         gint fields_length1);
static void pdfpc_config_file_reader_unbindKeyOrMouse (pdfpcConfigFileReader* self,
                                                gboolean is_mouse,
                                                const gchar* wholeLine,
                                                gchar** fields,
                                                gint fields_length1);
static guint ___lambda51_ (pdfpcConfigFileReader* self,
                    const gchar* x);
static guint ____lambda51__pdfpc_config_file_readerbinding2uint (const gchar* a,
                                                          gpointer self);
static void pdfpc_config_file_reader_unbindKey (pdfpcConfigFileReader* self,
                                         const gchar* wholeLine,
                                         gchar** fields,
                                         gint fields_length1);
static void pdfpc_config_file_reader_unbindMouse (pdfpcConfigFileReader* self,
                                           const gchar* wholeLine,
                                           gchar** fields,
                                           gint fields_length1);
static void pdfpc_config_file_reader_unbindKeyAll (pdfpcConfigFileReader* self);
static void pdfpc_config_file_reader_unbindMouseAll (pdfpcConfigFileReader* self);
VALA_EXTERN void pdfpc_config_file_reader_readConfig (pdfpcConfigFileReader* self,
                                          const gchar* fname);
VALA_EXTERN void pdfpc_config_file_reader_parseStatement (pdfpcConfigFileReader* self,
                                              const gchar* line);
static void pdfpc_config_file_reader_readOption (pdfpcConfigFileReader* self,
                                          const gchar* wholeLine,
                                          gchar** fields,
                                          gint fields_length1);
VALA_EXTERN GType pdfpc_options_toolbox_direction_get_type (void) G_GNUC_CONST ;
VALA_EXTERN pdfpcOptionsToolboxDirection pdfpc_options_toolbox_direction_parse (const gchar* dir);
static void pdfpc_config_file_reader_finalize (pdfpcConfigFileReader * obj);
static GType pdfpc_config_file_reader_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 gssize _vala_array_length (gpointer array);

GQuark
pdfpc_config_file_error_quark (void)
{
	return g_quark_from_static_string ("pdfpc-config-file-error-quark");
}

static GType
pdfpc_config_file_error_get_type_once (void)
{
	static const GEnumValue values[] = {{PDFPC_CONFIG_FILE_ERROR_INVALID_BIND, "PDFPC_CONFIG_FILE_ERROR_INVALID_BIND", "invalid-bind"}, {0, NULL, NULL}};
	GType pdfpc_config_file_error_type_id;
	pdfpc_config_file_error_type_id = g_enum_register_static ("pdfpcConfigFileError", values);
	return pdfpc_config_file_error_type_id;
}

GType
pdfpc_config_file_error_get_type (void)
{
	static volatile gsize pdfpc_config_file_error_type_id__once = 0;
	if (g_once_init_enter (&pdfpc_config_file_error_type_id__once)) {
		GType pdfpc_config_file_error_type_id;
		pdfpc_config_file_error_type_id = pdfpc_config_file_error_get_type_once ();
		g_once_init_leave (&pdfpc_config_file_error_type_id__once, pdfpc_config_file_error_type_id);
	}
	return pdfpc_config_file_error_type_id__once;
}

pdfpcConfigFileReader*
pdfpc_config_file_reader_construct (GType object_type)
{
	pdfpcConfigFileReader* self = NULL;
	self = (pdfpcConfigFileReader*) g_type_create_instance (object_type);
	return self;
}

pdfpcConfigFileReader*
pdfpc_config_file_reader_new (void)
{
	return pdfpc_config_file_reader_construct (PDFPC_TYPE_CONFIG_FILE_READER);
}

static gchar
string_get (const gchar* self,
            glong index)
{
	gchar _tmp0_;
	gchar result;
	g_return_val_if_fail (self != NULL, '\0');
	_tmp0_ = ((gchar*) self)[index];
	result = _tmp0_;
	return result;
}

static void
pdfpc_config_file_reader_readBindDef (pdfpcConfigFileReader* self,
                                      const gchar* name,
                                      pdfpcConfigFileReaderbinding2uint conversor,
                                      gpointer conversor_target,
                                      guint* code,
                                      guint* modMask)
{
	guint _vala_code = 0U;
	guint _vala_modMask = 0U;
	gchar** fields = NULL;
	gchar** _tmp0_;
	gchar** _tmp1_;
	gint fields_length1;
	gint _fields_size_;
	gchar** _tmp2_;
	gint _tmp2__length1;
	gboolean _tmp16_ = FALSE;
	gboolean _tmp17_ = FALSE;
	gboolean _tmp18_ = FALSE;
	g_return_if_fail (self != NULL);
	g_return_if_fail (name != NULL);
	_tmp1_ = _tmp0_ = g_strsplit (name, "+", 0);
	fields = _tmp1_;
	fields_length1 = _vala_array_length (_tmp0_);
	_fields_size_ = fields_length1;
	_vala_modMask = (guint) 0x0;
	_vala_code = (guint) 0x0;
	_tmp2_ = fields;
	_tmp2__length1 = fields_length1;
	if (_tmp2__length1 == 1) {
		_vala_code = conversor (name, conversor_target);
	} else {
		gchar** _tmp3_;
		gint _tmp3__length1;
		_tmp3_ = fields;
		_tmp3__length1 = fields_length1;
		if (_tmp3__length1 == 2) {
			gchar* modString = NULL;
			gchar** _tmp4_;
			gint _tmp4__length1;
			const gchar* _tmp5_;
			gchar* _tmp6_;
			gchar** _tmp14_;
			gint _tmp14__length1;
			const gchar* _tmp15_;
			_tmp4_ = fields;
			_tmp4__length1 = fields_length1;
			_tmp5_ = _tmp4_[0];
			_tmp6_ = g_strdup (_tmp5_);
			modString = _tmp6_;
			{
				gint m = 0;
				m = 0;
				{
					gboolean _tmp7_ = FALSE;
					_tmp7_ = TRUE;
					while (TRUE) {
						const gchar* _tmp9_;
						gint _tmp10_;
						gint _tmp11_;
						const gchar* _tmp12_;
						if (!_tmp7_) {
							gint _tmp8_;
							m = m + 1;
							_tmp8_ = m;
						}
						_tmp7_ = FALSE;
						_tmp9_ = modString;
						_tmp10_ = strlen (_tmp9_);
						_tmp11_ = _tmp10_;
						if (!(m < _tmp11_)) {
							break;
						}
						_tmp12_ = modString;
						switch (string_get (_tmp12_, (glong) m)) {
							case 'S':
							{
								_vala_modMask = _vala_modMask | GDK_SHIFT_MASK;
								break;
							}
							case 'C':
							{
								_vala_modMask = _vala_modMask | GDK_CONTROL_MASK;
								break;
							}
							case 'A':
							case 'M':
							{
								_vala_modMask = _vala_modMask | GDK_META_MASK;
								break;
							}
							default:
							{
								const gchar* _tmp13_;
								_tmp13_ = modString;
								g_printerr ("Warning: Ignoring unknown modifier '%c'\n", (gint) string_get (_tmp13_, (glong) m));
								break;
							}
						}
					}
				}
			}
			_tmp14_ = fields;
			_tmp14__length1 = fields_length1;
			_tmp15_ = _tmp14_[1];
			_vala_code = conversor (_tmp15_, conversor_target);
			_g_free0 (modString);
		}
	}
	if (((guint) 'A') <= _vala_code) {
		_tmp16_ = _vala_code <= ((guint) 'Z');
	} else {
		_tmp16_ = FALSE;
	}
	if (_tmp16_) {
		_vala_modMask = _vala_modMask | GDK_SHIFT_MASK;
	}
	if (((guint) 'a') <= _vala_code) {
		_tmp18_ = _vala_code <= ((guint) 'z');
	} else {
		_tmp18_ = FALSE;
	}
	if (_tmp18_) {
		_tmp17_ = (_vala_modMask | GDK_SHIFT_MASK) == _vala_modMask;
	} else {
		_tmp17_ = FALSE;
	}
	if (_tmp17_) {
		_vala_code = _vala_code ^ (1 << 5);
	}
	fields = (_vala_array_free (fields, fields_length1, (GDestroyNotify) g_free), NULL);
	if (code) {
		*code = _vala_code;
	}
	if (modMask) {
		*modMask = _vala_modMask;
	}
}

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

static guint
___lambda50_ (pdfpcConfigFileReader* self,
              const gchar* x)
{
	guint result;
	g_return_val_if_fail (x != NULL, 0U);
	result = (guint) atoi (x);
	return result;
}

static guint
____lambda50__pdfpc_config_file_readerbinding2uint (const gchar* a,
                                                    gpointer self)
{
	guint result;
	result = ___lambda50_ ((pdfpcConfigFileReader*) self, a);
	return result;
}

static guint
_gdk_keyval_from_name_pdfpc_config_file_readerbinding2uint (const gchar* a,
                                                            gpointer self)
{
	guint result;
	result = gdk_keyval_from_name (a);
	return result;
}

static void
pdfpc_config_file_reader_bindKeyOrMouse (pdfpcConfigFileReader* self,
                                         gboolean is_mouse,
                                         const gchar* wholeLine,
                                         gchar** fields,
                                         gint fields_length1)
{
	gboolean _tmp0_ = FALSE;
	guint modMask = 0U;
	guint keycode = 0U;
	GeeList* bindings = NULL;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (wholeLine != NULL);
	if (fields_length1 != 3) {
		_tmp0_ = fields_length1 != 4;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		g_printerr ("Bad bind specification: %s\n", wholeLine);
		return;
	}
	modMask = (guint) 0;
	keycode = (guint) 0;
	if (is_mouse) {
		GeeList* _tmp1_;
		GeeList* _tmp2_;
		const gchar* _tmp3_;
		guint _tmp4_ = 0U;
		guint _tmp5_ = 0U;
		_tmp1_ = pdfpc_options_mouse_bindings;
		_tmp2_ = _g_object_ref0 (_tmp1_);
		_g_object_unref0 (bindings);
		bindings = _tmp2_;
		_tmp3_ = fields[1];
		pdfpc_config_file_reader_readBindDef (self, _tmp3_, ____lambda50__pdfpc_config_file_readerbinding2uint, self, &_tmp4_, &_tmp5_);
		keycode = _tmp4_;
		modMask = _tmp5_;
	} else {
		GeeList* _tmp6_;
		GeeList* _tmp7_;
		const gchar* _tmp8_;
		guint _tmp9_ = 0U;
		guint _tmp10_ = 0U;
		_tmp6_ = pdfpc_options_key_bindings;
		_tmp7_ = _g_object_ref0 (_tmp6_);
		_g_object_unref0 (bindings);
		bindings = _tmp7_;
		_tmp8_ = fields[1];
		pdfpc_config_file_reader_readBindDef (self, _tmp8_, _gdk_keyval_from_name_pdfpc_config_file_readerbinding2uint, NULL, &_tmp9_, &_tmp10_);
		keycode = _tmp9_;
		modMask = _tmp10_;
	}
	if (keycode == ((guint) 0x0)) {
		const gchar* _tmp11_;
		_tmp11_ = fields[1];
		g_printerr ("Warning: Unknown key/button: %s\n", _tmp11_);
	} else {
		{
			pdfpcOptionsBindTuple* bt = NULL;
			pdfpcOptionsBindTuple* _tmp12_;
			pdfpcOptionsBindTuple* _tmp13_;
			gchar* _tmp14_;
			pdfpcOptionsBindTuple* _tmp15_;
			pdfpcOptionsBindTuple* _tmp16_;
			pdfpcOptionsBindTuple* _tmp17_;
			const gchar* _tmp18_;
			gchar* _tmp19_;
			GeeList* _tmp22_;
			pdfpcOptionsBindTuple* _tmp23_;
			_tmp12_ = pdfpc_options_bind_tuple_new ();
			bt = _tmp12_;
			_tmp13_ = bt;
			_tmp14_ = g_strdup ("bind");
			_g_free0 (_tmp13_->type);
			_tmp13_->type = _tmp14_;
			_tmp15_ = bt;
			_tmp15_->keyCode = keycode;
			_tmp16_ = bt;
			_tmp16_->modMask = modMask;
			_tmp17_ = bt;
			_tmp18_ = fields[2];
			_tmp19_ = g_strdup (_tmp18_);
			_g_free0 (_tmp17_->actionName);
			_tmp17_->actionName = _tmp19_;
			if (fields_length1 > 3) {
				pdfpcOptionsBindTuple* _tmp20_;
				const gchar* _tmp21_;
				_tmp20_ = bt;
				_tmp21_ = fields[3];
				pdfpc_options_bind_tuple_setActionArg (_tmp20_, _tmp21_, &_inner_error0_);
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					_pdfpc_options_bind_tuple_unref0 (bt);
					if (_inner_error0_->domain == PDFPC_CONFIG_FILE_ERROR) {
						goto __catch0_pdfpc_config_file_error;
					}
					_g_object_unref0 (bindings);
					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;
				}
			}
			_tmp22_ = bindings;
			_tmp23_ = bt;
			gee_collection_add ((GeeCollection*) _tmp22_, _tmp23_);
			_pdfpc_options_bind_tuple_unref0 (bt);
		}
		goto __finally0;
		__catch0_pdfpc_config_file_error:
		{
			GError* e = NULL;
			GError* _tmp24_;
			const gchar* _tmp25_;
			e = _inner_error0_;
			_inner_error0_ = NULL;
			_tmp24_ = e;
			_tmp25_ = _tmp24_->message;
			g_printerr ("Line '%s' contains errors. Reason: %s\n", wholeLine, _tmp25_);
			_g_error_free0 (e);
		}
		__finally0:
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (bindings);
			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;
		}
	}
	_g_object_unref0 (bindings);
}

static void
pdfpc_config_file_reader_bindKey (pdfpcConfigFileReader* self,
                                  const gchar* wholeLine,
                                  gchar** fields,
                                  gint fields_length1)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (wholeLine != NULL);
	pdfpc_config_file_reader_bindKeyOrMouse (self, FALSE, wholeLine, fields, (gint) fields_length1);
}

static void
pdfpc_config_file_reader_bindMouse (pdfpcConfigFileReader* self,
                                    const gchar* wholeLine,
                                    gchar** fields,
                                    gint fields_length1)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (wholeLine != NULL);
	pdfpc_config_file_reader_bindKeyOrMouse (self, TRUE, wholeLine, fields, (gint) fields_length1);
}

static guint
___lambda51_ (pdfpcConfigFileReader* self,
              const gchar* x)
{
	guint result;
	g_return_val_if_fail (x != NULL, 0U);
	result = (guint) atoi (x);
	return result;
}

static guint
____lambda51__pdfpc_config_file_readerbinding2uint (const gchar* a,
                                                    gpointer self)
{
	guint result;
	result = ___lambda51_ ((pdfpcConfigFileReader*) self, a);
	return result;
}

static void
pdfpc_config_file_reader_unbindKeyOrMouse (pdfpcConfigFileReader* self,
                                           gboolean is_mouse,
                                           const gchar* wholeLine,
                                           gchar** fields,
                                           gint fields_length1)
{
	guint modMask = 0U;
	guint keycode = 0U;
	GeeList* bindings = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (wholeLine != NULL);
	if (fields_length1 != 2) {
		g_printerr ("Bad unbind specification: %s\n", wholeLine);
		return;
	}
	modMask = (guint) 0;
	keycode = (guint) 0;
	if (is_mouse) {
		GeeList* _tmp0_;
		GeeList* _tmp1_;
		const gchar* _tmp2_;
		guint _tmp3_ = 0U;
		guint _tmp4_ = 0U;
		_tmp0_ = pdfpc_options_mouse_bindings;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		_g_object_unref0 (bindings);
		bindings = _tmp1_;
		_tmp2_ = fields[1];
		pdfpc_config_file_reader_readBindDef (self, _tmp2_, ____lambda51__pdfpc_config_file_readerbinding2uint, self, &_tmp3_, &_tmp4_);
		keycode = _tmp3_;
		modMask = _tmp4_;
	} else {
		GeeList* _tmp5_;
		GeeList* _tmp6_;
		const gchar* _tmp7_;
		guint _tmp8_ = 0U;
		guint _tmp9_ = 0U;
		_tmp5_ = pdfpc_options_key_bindings;
		_tmp6_ = _g_object_ref0 (_tmp5_);
		_g_object_unref0 (bindings);
		bindings = _tmp6_;
		_tmp7_ = fields[1];
		pdfpc_config_file_reader_readBindDef (self, _tmp7_, _gdk_keyval_from_name_pdfpc_config_file_readerbinding2uint, NULL, &_tmp8_, &_tmp9_);
		keycode = _tmp8_;
		modMask = _tmp9_;
	}
	if (keycode == ((guint) 0x0)) {
		const gchar* _tmp10_;
		_tmp10_ = fields[1];
		g_printerr ("Warning: Unknown key/button: %s\n", _tmp10_);
	} else {
		pdfpcOptionsBindTuple* bt = NULL;
		pdfpcOptionsBindTuple* _tmp11_;
		pdfpcOptionsBindTuple* _tmp12_;
		gchar* _tmp13_;
		pdfpcOptionsBindTuple* _tmp14_;
		pdfpcOptionsBindTuple* _tmp15_;
		GeeList* _tmp16_;
		pdfpcOptionsBindTuple* _tmp17_;
		_tmp11_ = pdfpc_options_bind_tuple_new ();
		bt = _tmp11_;
		_tmp12_ = bt;
		_tmp13_ = g_strdup ("unbind");
		_g_free0 (_tmp12_->type);
		_tmp12_->type = _tmp13_;
		_tmp14_ = bt;
		_tmp14_->keyCode = keycode;
		_tmp15_ = bt;
		_tmp15_->modMask = modMask;
		_tmp16_ = bindings;
		_tmp17_ = bt;
		gee_collection_add ((GeeCollection*) _tmp16_, _tmp17_);
		_pdfpc_options_bind_tuple_unref0 (bt);
	}
	_g_object_unref0 (bindings);
}

static void
pdfpc_config_file_reader_unbindKey (pdfpcConfigFileReader* self,
                                    const gchar* wholeLine,
                                    gchar** fields,
                                    gint fields_length1)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (wholeLine != NULL);
	pdfpc_config_file_reader_unbindKeyOrMouse (self, FALSE, wholeLine, fields, (gint) fields_length1);
}

static void
pdfpc_config_file_reader_unbindMouse (pdfpcConfigFileReader* self,
                                      const gchar* wholeLine,
                                      gchar** fields,
                                      gint fields_length1)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (wholeLine != NULL);
	pdfpc_config_file_reader_unbindKeyOrMouse (self, TRUE, wholeLine, fields, (gint) fields_length1);
}

static void
pdfpc_config_file_reader_unbindKeyAll (pdfpcConfigFileReader* self)
{
	pdfpcOptionsBindTuple* bt = NULL;
	pdfpcOptionsBindTuple* _tmp0_;
	gchar* _tmp1_;
	GeeList* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = pdfpc_options_bind_tuple_new ();
	bt = _tmp0_;
	_tmp1_ = g_strdup ("unbindall");
	_g_free0 (bt->type);
	bt->type = _tmp1_;
	_tmp2_ = pdfpc_options_key_bindings;
	gee_collection_add ((GeeCollection*) _tmp2_, bt);
	_pdfpc_options_bind_tuple_unref0 (bt);
}

static void
pdfpc_config_file_reader_unbindMouseAll (pdfpcConfigFileReader* self)
{
	pdfpcOptionsBindTuple* bt = NULL;
	pdfpcOptionsBindTuple* _tmp0_;
	gchar* _tmp1_;
	GeeList* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = pdfpc_options_bind_tuple_new ();
	bt = _tmp0_;
	_tmp1_ = g_strdup ("unbindall");
	_g_free0 (bt->type);
	bt->type = _tmp1_;
	_tmp2_ = pdfpc_options_mouse_bindings;
	gee_collection_add ((GeeCollection*) _tmp2_, bt);
	_pdfpc_options_bind_tuple_unref0 (bt);
}

void
pdfpc_config_file_reader_readConfig (pdfpcConfigFileReader* self,
                                     const gchar* fname)
{
	GFile* file = NULL;
	GFile* _tmp0_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (fname != NULL);
	_tmp0_ = g_file_new_for_path (fname);
	file = _tmp0_;
	{
		guint8* raw_datau8 = NULL;
		gint raw_datau8_length1 = 0;
		gint _raw_datau8_size_ = 0;
		GFile* _tmp1_;
		guint8* _tmp2_ = NULL;
		gsize _tmp3_ = 0;
		gchar** lines = NULL;
		guint8* _tmp4_;
		gint _tmp4__length1;
		gchar** _tmp5_;
		gchar** _tmp6_;
		gint lines_length1;
		gint _lines_size_;
		_tmp1_ = file;
		g_file_load_contents (_tmp1_, NULL, &_tmp2_, &_tmp3_, NULL, &_inner_error0_);
		raw_datau8 = (g_free (raw_datau8), NULL);
		raw_datau8 = _tmp2_;
		raw_datau8_length1 = _tmp3_;
		_raw_datau8_size_ = raw_datau8_length1;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			raw_datau8 = (g_free (raw_datau8), NULL);
			goto __catch0_g_error;
		}
		_tmp4_ = raw_datau8;
		_tmp4__length1 = raw_datau8_length1;
		_tmp6_ = _tmp5_ = g_strsplit ((const gchar*) _tmp4_, "\n", 0);
		lines = _tmp6_;
		lines_length1 = _vala_array_length (_tmp5_);
		_lines_size_ = lines_length1;
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp7_ = FALSE;
				_tmp7_ = TRUE;
				while (TRUE) {
					gchar** _tmp9_;
					gint _tmp9__length1;
					gchar** _tmp10_;
					gint _tmp10__length1;
					const gchar* _tmp11_;
					if (!_tmp7_) {
						gint _tmp8_;
						i = i + 1;
						_tmp8_ = i;
					}
					_tmp7_ = FALSE;
					_tmp9_ = lines;
					_tmp9__length1 = lines_length1;
					if (!(i < _tmp9__length1)) {
						break;
					}
					_tmp10_ = lines;
					_tmp10__length1 = lines_length1;
					_tmp11_ = _tmp10_[i];
					pdfpc_config_file_reader_parseStatement (self, _tmp11_);
				}
			}
		}
		lines = (_vala_array_free (lines, lines_length1, (GDestroyNotify) g_free), NULL);
		raw_datau8 = (g_free (raw_datau8), NULL);
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_inner_error0_);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_object_unref0 (file);
		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;
	}
	_g_object_unref0 (file);
}

static gchar*
string_strip (const gchar* self)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup (self);
	_result_ = _tmp0_;
	g_strstrip (_result_);
	result = _result_;
	return result;
}

void
pdfpc_config_file_reader_parseStatement (pdfpcConfigFileReader* self,
                                         const gchar* line)
{
	gchar* statement = NULL;
	gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar** fields = NULL;
	const gchar* _tmp2_;
	gchar** _tmp3_;
	gchar** _tmp4_;
	gint fields_length1;
	gint _fields_size_;
	gchar** _tmp5_;
	gint _tmp5__length1;
	gchar** _tmp6_;
	gint _tmp6__length1;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	GQuark _tmp10_ = 0U;
	static GQuark _tmp9_label0 = 0;
	static GQuark _tmp9_label1 = 0;
	static GQuark _tmp9_label2 = 0;
	static GQuark _tmp9_label3 = 0;
	static GQuark _tmp9_label4 = 0;
	static GQuark _tmp9_label5 = 0;
	static GQuark _tmp9_label6 = 0;
	g_return_if_fail (self != NULL);
	g_return_if_fail (line != NULL);
	_tmp0_ = string_strip (line);
	statement = _tmp0_;
	_tmp1_ = statement;
	if (string_get (_tmp1_, (glong) 0) == '#') {
		_g_free0 (statement);
		return;
	}
	_tmp2_ = statement;
	_tmp4_ = _tmp3_ = g_regex_split_simple ("[ \t]+", _tmp2_, 0, 0);
	fields = _tmp4_;
	fields_length1 = _vala_array_length (_tmp3_);
	_fields_size_ = fields_length1;
	_tmp5_ = fields;
	_tmp5__length1 = fields_length1;
	if (_tmp5__length1 == 0) {
		fields = (_vala_array_free (fields, fields_length1, (GDestroyNotify) g_free), NULL);
		_g_free0 (statement);
		return;
	}
	_tmp6_ = fields;
	_tmp6__length1 = fields_length1;
	_tmp7_ = _tmp6_[0];
	_tmp8_ = _tmp7_;
	_tmp10_ = (NULL == _tmp8_) ? 0 : g_quark_from_string (_tmp8_);
	if (_tmp10_ == ((0 != _tmp9_label0) ? _tmp9_label0 : (_tmp9_label0 = g_quark_from_static_string ("bind")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp11_;
				gchar** _tmp12_;
				gint _tmp12__length1;
				_tmp11_ = statement;
				_tmp12_ = fields;
				_tmp12__length1 = fields_length1;
				pdfpc_config_file_reader_bindKey (self, _tmp11_, _tmp12_, (gint) _tmp12__length1);
				break;
			}
		}
	} else if (_tmp10_ == ((0 != _tmp9_label1) ? _tmp9_label1 : (_tmp9_label1 = g_quark_from_static_string ("unbind")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp13_;
				gchar** _tmp14_;
				gint _tmp14__length1;
				_tmp13_ = statement;
				_tmp14_ = fields;
				_tmp14__length1 = fields_length1;
				pdfpc_config_file_reader_unbindKey (self, _tmp13_, _tmp14_, (gint) _tmp14__length1);
				break;
			}
		}
	} else if (_tmp10_ == ((0 != _tmp9_label2) ? _tmp9_label2 : (_tmp9_label2 = g_quark_from_static_string ("unbind_all")))) {
		switch (0) {
			default:
			{
				pdfpc_config_file_reader_unbindKeyAll (self);
				break;
			}
		}
	} else if (_tmp10_ == ((0 != _tmp9_label3) ? _tmp9_label3 : (_tmp9_label3 = g_quark_from_static_string ("mouse")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp15_;
				gchar** _tmp16_;
				gint _tmp16__length1;
				_tmp15_ = statement;
				_tmp16_ = fields;
				_tmp16__length1 = fields_length1;
				pdfpc_config_file_reader_bindMouse (self, _tmp15_, _tmp16_, (gint) _tmp16__length1);
				break;
			}
		}
	} else if (_tmp10_ == ((0 != _tmp9_label4) ? _tmp9_label4 : (_tmp9_label4 = g_quark_from_static_string ("unmouse")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp17_;
				gchar** _tmp18_;
				gint _tmp18__length1;
				_tmp17_ = statement;
				_tmp18_ = fields;
				_tmp18__length1 = fields_length1;
				pdfpc_config_file_reader_unbindMouse (self, _tmp17_, _tmp18_, (gint) _tmp18__length1);
				break;
			}
		}
	} else if (_tmp10_ == ((0 != _tmp9_label5) ? _tmp9_label5 : (_tmp9_label5 = g_quark_from_static_string ("unmouse_all")))) {
		switch (0) {
			default:
			{
				pdfpc_config_file_reader_unbindMouseAll (self);
				break;
			}
		}
	} else if (_tmp10_ == ((0 != _tmp9_label6) ? _tmp9_label6 : (_tmp9_label6 = g_quark_from_static_string ("option")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp19_;
				gchar** _tmp20_;
				gint _tmp20__length1;
				_tmp19_ = statement;
				_tmp20_ = fields;
				_tmp20__length1 = fields_length1;
				pdfpc_config_file_reader_readOption (self, _tmp19_, _tmp20_, (gint) _tmp20__length1);
				break;
			}
		}
	} else {
		switch (0) {
			default:
			{
				const gchar* _tmp21_;
				_tmp21_ = statement;
				g_printerr ("Warning: Invalid configuration statement \"%s\"\n", _tmp21_);
				break;
			}
		}
	}
	fields = (_vala_array_free (fields, fields_length1, (GDestroyNotify) g_free), NULL);
	_g_free0 (statement);
}

static gboolean
bool_parse (const gchar* str)
{
	gboolean result;
	g_return_val_if_fail (str != NULL, FALSE);
	if (g_strcmp0 (str, "true") == 0) {
		result = TRUE;
		return result;
	} else {
		result = FALSE;
		return result;
	}
}

static void
pdfpc_config_file_reader_readOption (pdfpcConfigFileReader* self,
                                     const gchar* wholeLine,
                                     gchar** fields,
                                     gint fields_length1)
{
	const gchar* _tmp0_;
	const 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;
	static GQuark _tmp2_label4 = 0;
	static GQuark _tmp2_label5 = 0;
	static GQuark _tmp2_label6 = 0;
	static GQuark _tmp2_label7 = 0;
	static GQuark _tmp2_label8 = 0;
	static GQuark _tmp2_label9 = 0;
	static GQuark _tmp2_label10 = 0;
	static GQuark _tmp2_label11 = 0;
	static GQuark _tmp2_label12 = 0;
	static GQuark _tmp2_label13 = 0;
	static GQuark _tmp2_label14 = 0;
	static GQuark _tmp2_label15 = 0;
	static GQuark _tmp2_label16 = 0;
	static GQuark _tmp2_label17 = 0;
	static GQuark _tmp2_label18 = 0;
	static GQuark _tmp2_label19 = 0;
	static GQuark _tmp2_label20 = 0;
	static GQuark _tmp2_label21 = 0;
	static GQuark _tmp2_label22 = 0;
	static GQuark _tmp2_label23 = 0;
	static GQuark _tmp2_label24 = 0;
	static GQuark _tmp2_label25 = 0;
	static GQuark _tmp2_label26 = 0;
	static GQuark _tmp2_label27 = 0;
	static GQuark _tmp2_label28 = 0;
	static GQuark _tmp2_label29 = 0;
	static GQuark _tmp2_label30 = 0;
	static GQuark _tmp2_label31 = 0;
	static GQuark _tmp2_label32 = 0;
	static GQuark _tmp2_label33 = 0;
	static GQuark _tmp2_label34 = 0;
	static GQuark _tmp2_label35 = 0;
	static GQuark _tmp2_label36 = 0;
	static GQuark _tmp2_label37 = 0;
	static GQuark _tmp2_label38 = 0;
	static GQuark _tmp2_label39 = 0;
	static GQuark _tmp2_label40 = 0;
	static GQuark _tmp2_label41 = 0;
	static GQuark _tmp2_label42 = 0;
	static GQuark _tmp2_label43 = 0;
	g_return_if_fail (self != NULL);
	g_return_if_fail (wholeLine != NULL);
	if (fields_length1 != 3) {
		g_printerr ("Bad option specification: %s\n", wholeLine);
		return;
	}
	_tmp0_ = fields[1];
	_tmp1_ = _tmp0_;
	_tmp3_ = (NULL == _tmp1_) ? 0 : g_quark_from_string (_tmp1_);
	if (_tmp3_ == ((0 != _tmp2_label0) ? _tmp2_label0 : (_tmp2_label0 = g_quark_from_static_string ("black-on-end")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp4_;
				_tmp4_ = fields[2];
				pdfpc_options_black_on_end = bool_parse (_tmp4_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label1) ? _tmp2_label1 : (_tmp2_label1 = g_quark_from_static_string ("cache-debug")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp5_;
				_tmp5_ = fields[2];
				pdfpc_options_cache_debug = bool_parse (_tmp5_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label2) ? _tmp2_label2 : (_tmp2_label2 = g_quark_from_static_string ("cache-clean-period")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp6_;
				_tmp6_ = fields[2];
				pdfpc_options_cache_clean_period = atoi (_tmp6_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label3) ? _tmp2_label3 : (_tmp2_label3 = g_quark_from_static_string ("cache-expiration")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp7_;
				_tmp7_ = fields[2];
				pdfpc_options_cache_expiration = atoi (_tmp7_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label4) ? _tmp2_label4 : (_tmp2_label4 = g_quark_from_static_string ("cache-max-rtime")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp8_;
				_tmp8_ = fields[2];
				pdfpc_options_cache_max_rtime = atoi (_tmp8_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label5) ? _tmp2_label5 : (_tmp2_label5 = g_quark_from_static_string ("cache-min-rtime")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp9_;
				_tmp9_ = fields[2];
				pdfpc_options_cache_min_rtime = atoi (_tmp9_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label6) ? _tmp2_label6 : (_tmp2_label6 = g_quark_from_static_string ("cache-max-usize")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp10_;
				_tmp10_ = fields[2];
				pdfpc_options_cache_max_usize = atoi (_tmp10_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label7) ? _tmp2_label7 : (_tmp2_label7 = g_quark_from_static_string ("current-height")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp11_;
				_tmp11_ = fields[2];
				pdfpc_options_current_height = (guint) atoi (_tmp11_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label8) ? _tmp2_label8 : (_tmp2_label8 = g_quark_from_static_string ("current-size")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp12_;
				_tmp12_ = fields[2];
				pdfpc_options_current_size = (guint) atoi (_tmp12_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label9) ? _tmp2_label9 : (_tmp2_label9 = g_quark_from_static_string ("cursor-timeout")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp13_;
				_tmp13_ = fields[2];
				pdfpc_options_cursor_timeout = atoi (_tmp13_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label10) ? _tmp2_label10 : (_tmp2_label10 = g_quark_from_static_string ("disable-input-autodetection")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp14_;
				_tmp14_ = fields[2];
				pdfpc_options_disable_input_autodetection = bool_parse (_tmp14_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label11) ? _tmp2_label11 : (_tmp2_label11 = g_quark_from_static_string ("disable-input-pressure")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp15_;
				_tmp15_ = fields[2];
				pdfpc_options_disable_input_pressure = bool_parse (_tmp15_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label12) ? _tmp2_label12 : (_tmp2_label12 = g_quark_from_static_string ("disable-scrolling")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp16_;
				_tmp16_ = fields[2];
				pdfpc_options_disable_scrolling = bool_parse (_tmp16_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label13) ? _tmp2_label13 : (_tmp2_label13 = g_quark_from_static_string ("disable-tooltips")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp17_;
				_tmp17_ = fields[2];
				pdfpc_options_disable_tooltips = bool_parse (_tmp17_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label14) ? _tmp2_label14 : (_tmp2_label14 = g_quark_from_static_string ("enable-auto-srt-load")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp18_;
				_tmp18_ = fields[2];
				pdfpc_options_auto_srt = bool_parse (_tmp18_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label15) ? _tmp2_label15 : (_tmp2_label15 = g_quark_from_static_string ("final-slide")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp19_;
				_tmp19_ = fields[2];
				pdfpc_options_final_slide_overlay = bool_parse (_tmp19_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label16) ? _tmp2_label16 : (_tmp2_label16 = g_quark_from_static_string ("maximize-in-drawing")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp20_;
				_tmp20_ = fields[2];
				pdfpc_options_maximize_in_drawing = bool_parse (_tmp20_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label17) ? _tmp2_label17 : (_tmp2_label17 = g_quark_from_static_string ("move-on-mapped")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp21_;
				_tmp21_ = fields[2];
				pdfpc_options_move_on_mapped = bool_parse (_tmp21_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label18) ? _tmp2_label18 : (_tmp2_label18 = g_quark_from_static_string ("next-height")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp22_;
				_tmp22_ = fields[2];
				pdfpc_options_next_height = (guint) atoi (_tmp22_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label19) ? _tmp2_label19 : (_tmp2_label19 = g_quark_from_static_string ("next-slide-first-overlay")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp23_;
				_tmp23_ = fields[2];
				pdfpc_options_next_slide_first_overlay = bool_parse (_tmp23_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label20) ? _tmp2_label20 : (_tmp2_label20 = g_quark_from_static_string ("overview-min-size")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp24_;
				_tmp24_ = fields[2];
				pdfpc_options_min_overview_width = atoi (_tmp24_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label21) ? _tmp2_label21 : (_tmp2_label21 = g_quark_from_static_string ("pointer-color")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp25_;
				gchar* _tmp26_;
				_tmp25_ = fields[2];
				_tmp26_ = g_strdup (_tmp25_);
				_g_free0 (pdfpc_options_pointer_color);
				pdfpc_options_pointer_color = _tmp26_;
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label22) ? _tmp2_label22 : (_tmp2_label22 = g_quark_from_static_string ("pointer-opacity")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp27_;
				_tmp27_ = fields[2];
				pdfpc_options_pointer_opacity = atoi (_tmp27_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label23) ? _tmp2_label23 : (_tmp2_label23 = g_quark_from_static_string ("pointer-size")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp28_;
				_tmp28_ = fields[2];
				pdfpc_options_pointer_size = (guint) atoi (_tmp28_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label24) ? _tmp2_label24 : (_tmp2_label24 = g_quark_from_static_string ("prerender-delay")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp29_;
				_tmp29_ = fields[2];
				pdfpc_options_prerender_delay = atoi (_tmp29_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label25) ? _tmp2_label25 : (_tmp2_label25 = g_quark_from_static_string ("prerender-slides")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp30_;
				_tmp30_ = fields[2];
				pdfpc_options_prerender_slides = atoi (_tmp30_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label26) ? _tmp2_label26 : (_tmp2_label26 = g_quark_from_static_string ("presentation-interactive")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp31_;
				_tmp31_ = fields[2];
				pdfpc_options_presentation_interactive = bool_parse (_tmp31_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label27) ? _tmp2_label27 : (_tmp2_label27 = g_quark_from_static_string ("presentation-screen")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp32_;
				_tmp32_ = pdfpc_options_presentation_screen;
				if (_tmp32_ == NULL) {
					const gchar* _tmp33_;
					gchar* _tmp34_;
					_tmp33_ = fields[2];
					_tmp34_ = g_strdup (_tmp33_);
					_g_free0 (pdfpc_options_presentation_screen);
					pdfpc_options_presentation_screen = _tmp34_;
				}
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label28) ? _tmp2_label28 : (_tmp2_label28 = g_quark_from_static_string ("presenter-screen")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp35_;
				_tmp35_ = pdfpc_options_presenter_screen;
				if (_tmp35_ == NULL) {
					const gchar* _tmp36_;
					gchar* _tmp37_;
					_tmp36_ = fields[2];
					_tmp37_ = g_strdup (_tmp36_);
					_g_free0 (pdfpc_options_presenter_screen);
					pdfpc_options_presenter_screen = _tmp37_;
				}
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label29) ? _tmp2_label29 : (_tmp2_label29 = g_quark_from_static_string ("rest-https")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp38_;
				_tmp38_ = fields[2];
				pdfpc_options_rest_https = bool_parse (_tmp38_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label30) ? _tmp2_label30 : (_tmp2_label30 = g_quark_from_static_string ("rest-port")))) {
		switch (0) {
			default:
			{
				if (pdfpc_options_rest_port == 0) {
					const gchar* _tmp39_;
					_tmp39_ = fields[2];
					pdfpc_options_rest_port = atoi (_tmp39_);
				}
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label31) ? _tmp2_label31 : (_tmp2_label31 = g_quark_from_static_string ("rest-passwd")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp40_;
				gchar* _tmp41_;
				_tmp40_ = fields[2];
				_tmp41_ = g_strdup (_tmp40_);
				_g_free0 (pdfpc_options_rest_passwd);
				pdfpc_options_rest_passwd = _tmp41_;
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label32) ? _tmp2_label32 : (_tmp2_label32 = g_quark_from_static_string ("rest-static-root")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp42_;
				gchar* _tmp43_;
				_tmp42_ = fields[2];
				_tmp43_ = g_strdup (_tmp42_);
				_g_free0 (pdfpc_options_rest_static_root);
				pdfpc_options_rest_static_root = _tmp43_;
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label33) ? _tmp2_label33 : (_tmp2_label33 = g_quark_from_static_string ("spotlight-opacity")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp44_;
				_tmp44_ = fields[2];
				pdfpc_options_spotlight_opacity = atoi (_tmp44_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label34) ? _tmp2_label34 : (_tmp2_label34 = g_quark_from_static_string ("spotlight-size")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp45_;
				_tmp45_ = fields[2];
				pdfpc_options_spotlight_size = (guint) atoi (_tmp45_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label35) ? _tmp2_label35 : (_tmp2_label35 = g_quark_from_static_string ("status-height")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp46_;
				_tmp46_ = fields[2];
				pdfpc_options_status_height = (guint) atoi (_tmp46_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label36) ? _tmp2_label36 : (_tmp2_label36 = g_quark_from_static_string ("switch-screens")))) {
		switch (0) {
			default:
			{
				gboolean switch_screens = FALSE;
				const gchar* _tmp47_;
				_tmp47_ = fields[2];
				switch_screens = bool_parse (_tmp47_);
				if (switch_screens) {
					pdfpc_options_display_switch = TRUE;
				}
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label37) ? _tmp2_label37 : (_tmp2_label37 = g_quark_from_static_string ("time-of-day")))) {
		switch (0) {
			default:
			{
				gboolean use_time_of_day = FALSE;
				const gchar* _tmp48_;
				_tmp48_ = fields[2];
				use_time_of_day = bool_parse (_tmp48_);
				if (use_time_of_day) {
					pdfpc_options_use_time_of_day = TRUE;
				}
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label38) ? _tmp2_label38 : (_tmp2_label38 = g_quark_from_static_string ("timer-pace-color")))) {
		switch (0) {
			default:
			{
				gboolean timer_pace_color = FALSE;
				const gchar* _tmp49_;
				_tmp49_ = fields[2];
				timer_pace_color = bool_parse (_tmp49_);
				pdfpc_options_timer_pace_color = timer_pace_color;
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label39) ? _tmp2_label39 : (_tmp2_label39 = g_quark_from_static_string ("toolbox")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp50_;
				_tmp50_ = fields[2];
				pdfpc_options_toolbox_shown = bool_parse (_tmp50_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label40) ? _tmp2_label40 : (_tmp2_label40 = g_quark_from_static_string ("toolbox-direction")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp51_;
				_tmp51_ = fields[2];
				pdfpc_options_toolbox_direction = pdfpc_options_toolbox_direction_parse (_tmp51_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label41) ? _tmp2_label41 : (_tmp2_label41 = g_quark_from_static_string ("toolbox-minimized")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp52_;
				_tmp52_ = fields[2];
				pdfpc_options_toolbox_minimized = bool_parse (_tmp52_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label42) ? _tmp2_label42 : (_tmp2_label42 = g_quark_from_static_string ("transition-fps")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp53_;
				_tmp53_ = fields[2];
				pdfpc_options_transition_fps = (guint) atoi (_tmp53_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label43) ? _tmp2_label43 : (_tmp2_label43 = g_quark_from_static_string ("windowed-mode")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp54_;
				_tmp54_ = pdfpc_options_windowed;
				if (_tmp54_ == NULL) {
					const gchar* _tmp55_;
					gchar* _tmp56_;
					_tmp55_ = fields[2];
					_tmp56_ = g_strdup (_tmp55_);
					_g_free0 (pdfpc_options_windowed);
					pdfpc_options_windowed = _tmp56_;
				}
				break;
			}
		}
	} else {
		switch (0) {
			default:
			{
				const gchar* _tmp57_;
				_tmp57_ = fields[1];
				g_printerr ("Unknown option %s in pdfpcrc\n", _tmp57_);
				break;
			}
		}
	}
}

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

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

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

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

static gchar*
pdfpc_value_config_file_reader_collect_value (GValue* value,
                                              guint n_collect_values,
                                              GTypeCValue* collect_values,
                                              guint collect_flags)
{
	if (collect_values[0].v_pointer) {
		pdfpcConfigFileReader * 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_config_file_reader_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}

static gchar*
pdfpc_value_config_file_reader_lcopy_value (const GValue* value,
                                            guint n_collect_values,
                                            GTypeCValue* collect_values,
                                            guint collect_flags)
{
	pdfpcConfigFileReader ** 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_config_file_reader_ref (value->data[0].v_pointer);
	}
	return NULL;
}

GParamSpec*
pdfpc_param_spec_config_file_reader (const gchar* name,
                                     const gchar* nick,
                                     const gchar* blurb,
                                     GType object_type,
                                     GParamFlags flags)
{
	pdfpcParamSpecConfigFileReader* spec;
	g_return_val_if_fail (g_type_is_a (object_type, PDFPC_TYPE_CONFIG_FILE_READER), 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_value_get_config_file_reader (const GValue* value)
{
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PDFPC_TYPE_CONFIG_FILE_READER), NULL);
	return value->data[0].v_pointer;
}

void
pdfpc_value_set_config_file_reader (GValue* value,
                                    gpointer v_object)
{
	pdfpcConfigFileReader * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PDFPC_TYPE_CONFIG_FILE_READER));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PDFPC_TYPE_CONFIG_FILE_READER));
		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_config_file_reader_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		pdfpc_config_file_reader_unref (old);
	}
}

void
pdfpc_value_take_config_file_reader (GValue* value,
                                     gpointer v_object)
{
	pdfpcConfigFileReader * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PDFPC_TYPE_CONFIG_FILE_READER));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PDFPC_TYPE_CONFIG_FILE_READER));
		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_config_file_reader_unref (old);
	}
}

static void
pdfpc_config_file_reader_class_init (pdfpcConfigFileReaderClass * klass,
                                     gpointer klass_data)
{
	pdfpc_config_file_reader_parent_class = g_type_class_peek_parent (klass);
	((pdfpcConfigFileReaderClass *) klass)->finalize = pdfpc_config_file_reader_finalize;
}

static void
pdfpc_config_file_reader_instance_init (pdfpcConfigFileReader * self,
                                        gpointer klass)
{
	self->ref_count = 1;
}

static void
pdfpc_config_file_reader_finalize (pdfpcConfigFileReader * obj)
{
	pdfpcConfigFileReader * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PDFPC_TYPE_CONFIG_FILE_READER, pdfpcConfigFileReader);
	g_signal_handlers_destroy (self);
}

static GType
pdfpc_config_file_reader_get_type_once (void)
{
	static const GTypeValueTable g_define_type_value_table = { pdfpc_value_config_file_reader_init, pdfpc_value_config_file_reader_free_value, pdfpc_value_config_file_reader_copy_value, pdfpc_value_config_file_reader_peek_pointer, "p", pdfpc_value_config_file_reader_collect_value, "p", pdfpc_value_config_file_reader_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (pdfpcConfigFileReaderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) pdfpc_config_file_reader_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (pdfpcConfigFileReader), 0, (GInstanceInitFunc) pdfpc_config_file_reader_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_config_file_reader_type_id;
	pdfpc_config_file_reader_type_id = g_type_register_fundamental (g_type_fundamental_next (), "pdfpcConfigFileReader", &g_define_type_info, &g_define_type_fundamental_info, 0);
	return pdfpc_config_file_reader_type_id;
}

GType
pdfpc_config_file_reader_get_type (void)
{
	static volatile gsize pdfpc_config_file_reader_type_id__once = 0;
	if (g_once_init_enter (&pdfpc_config_file_reader_type_id__once)) {
		GType pdfpc_config_file_reader_type_id;
		pdfpc_config_file_reader_type_id = pdfpc_config_file_reader_get_type_once ();
		g_once_init_leave (&pdfpc_config_file_reader_type_id__once, pdfpc_config_file_reader_type_id);
	}
	return pdfpc_config_file_reader_type_id__once;
}

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

void
pdfpc_config_file_reader_unref (gpointer instance)
{
	pdfpcConfigFileReader * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		PDFPC_CONFIG_FILE_READER_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}

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 gssize
_vala_array_length (gpointer array)
{
	gssize length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}

