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

/*
 * Copyright 2024-2025 elementary, Inc. (https://elementary.io)
 * SPDX-License-Identifier: GPL-3.0-or-later
 */

#include <glib-object.h>
#include <gio/gio.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
#include <math.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 GALA_DAEMON_TYPE_DISPLAY_CONFIG (gala_daemon_display_config_get_type ())
#define GALA_DAEMON_DISPLAY_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GALA_DAEMON_TYPE_DISPLAY_CONFIG, GalaDaemonDisplayConfig))
#define GALA_DAEMON_IS_DISPLAY_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GALA_DAEMON_TYPE_DISPLAY_CONFIG))
#define GALA_DAEMON_DISPLAY_CONFIG_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GALA_DAEMON_TYPE_DISPLAY_CONFIG, GalaDaemonDisplayConfigIface))

typedef struct _GalaDaemonDisplayConfig GalaDaemonDisplayConfig;
typedef struct _GalaDaemonDisplayConfigIface GalaDaemonDisplayConfigIface;

#define GALA_DAEMON_TYPE_DISPLAY_CONFIG_PROXY (gala_daemon_display_config_proxy_get_type ())

#define TYPE_MUTTER_READ_MONITOR (mutter_read_monitor_get_type ())
typedef struct _MutterReadMonitor MutterReadMonitor;

#define TYPE_MUTTER_READ_MONITOR_INFO (mutter_read_monitor_info_get_type ())
typedef struct _MutterReadMonitorInfo MutterReadMonitorInfo;

#define TYPE_MUTTER_READ_MONITOR_MODE (mutter_read_monitor_mode_get_type ())
typedef struct _MutterReadMonitorMode MutterReadMonitorMode;

#define TYPE_MUTTER_READ_LOGICAL_MONITOR (mutter_read_logical_monitor_get_type ())
typedef struct _MutterReadLogicalMonitor MutterReadLogicalMonitor;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) ((var == NULL) ? NULL : (var = (g_free (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
enum  {
	GALA_DAEMON_DISPLAY_CONFIG_MONITORS_CHANGED_SIGNAL,
	GALA_DAEMON_DISPLAY_CONFIG_NUM_SIGNALS
};
static guint gala_daemon_display_config_signals[GALA_DAEMON_DISPLAY_CONFIG_NUM_SIGNALS] = {0};
typedef GDBusProxy GalaDaemonDisplayConfigProxy;
typedef GDBusProxyClass GalaDaemonDisplayConfigProxyClass;

struct _MutterReadMonitorInfo {
	gchar* connector;
	gchar* vendor;
	gchar* product;
	gchar* serial;
};

struct _MutterReadMonitorMode {
	gchar* id;
	gint width;
	gint height;
	gdouble frequency;
	gdouble preferred_scale;
	gdouble* supported_scales;
	gint supported_scales_length1;
	GHashTable* properties;
};

struct _MutterReadMonitor {
	MutterReadMonitorInfo monitor;
	MutterReadMonitorMode* modes;
	gint modes_length1;
	GHashTable* properties;
};

struct _MutterReadLogicalMonitor {
	gint x;
	gint y;
	gdouble scale;
	guint transform;
	gboolean primary;
	MutterReadMonitorInfo* monitors;
	gint monitors_length1;
	GHashTable* properties;
};

struct _GalaDaemonDisplayConfigIface {
	GTypeInterface parent_iface;
	void (*get_current_state) (GalaDaemonDisplayConfig* self, guint* serial, MutterReadMonitor** monitors, gint* monitors_length1, MutterReadLogicalMonitor** logical_monitors, gint* logical_monitors_length1, GHashTable** properties, GError** error);
};

static gboolean* gala_daemon_display_config__is_logical_layout;
static gboolean* gala_daemon_display_config__is_logical_layout = NULL;
static GalaDaemonDisplayConfig* gala_daemon_display_config_proxy;
static GalaDaemonDisplayConfig* gala_daemon_display_config_proxy = NULL;

VALA_EXTERN GType gala_daemon_display_config_proxy_get_type (void) G_GNUC_CONST ;
VALA_EXTERN guint gala_daemon_display_config_register_object (void* object,
                                                  GDBusConnection* connection,
                                                  const gchar* path,
                                                  GError** error);
VALA_EXTERN GType mutter_read_monitor_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType mutter_read_monitor_info_get_type (void) G_GNUC_CONST ;
VALA_EXTERN MutterReadMonitorInfo* mutter_read_monitor_info_dup (const MutterReadMonitorInfo* self);
VALA_EXTERN void mutter_read_monitor_info_free (MutterReadMonitorInfo* self);
VALA_EXTERN void mutter_read_monitor_info_copy (const MutterReadMonitorInfo* self,
                                    MutterReadMonitorInfo* dest);
VALA_EXTERN void mutter_read_monitor_info_destroy (MutterReadMonitorInfo* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (MutterReadMonitorInfo, mutter_read_monitor_info_destroy)
VALA_EXTERN GType mutter_read_monitor_mode_get_type (void) G_GNUC_CONST ;
VALA_EXTERN MutterReadMonitorMode* mutter_read_monitor_mode_dup (const MutterReadMonitorMode* self);
VALA_EXTERN void mutter_read_monitor_mode_free (MutterReadMonitorMode* self);
VALA_EXTERN void mutter_read_monitor_mode_copy (const MutterReadMonitorMode* self,
                                    MutterReadMonitorMode* dest);
VALA_EXTERN void mutter_read_monitor_mode_destroy (MutterReadMonitorMode* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (MutterReadMonitorMode, mutter_read_monitor_mode_destroy)
VALA_EXTERN MutterReadMonitor* mutter_read_monitor_dup (const MutterReadMonitor* self);
VALA_EXTERN void mutter_read_monitor_free (MutterReadMonitor* self);
VALA_EXTERN void mutter_read_monitor_copy (const MutterReadMonitor* self,
                               MutterReadMonitor* dest);
VALA_EXTERN void mutter_read_monitor_destroy (MutterReadMonitor* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (MutterReadMonitor, mutter_read_monitor_destroy)
VALA_EXTERN GType mutter_read_logical_monitor_get_type (void) G_GNUC_CONST ;
VALA_EXTERN MutterReadLogicalMonitor* mutter_read_logical_monitor_dup (const MutterReadLogicalMonitor* self);
VALA_EXTERN void mutter_read_logical_monitor_free (MutterReadLogicalMonitor* self);
VALA_EXTERN void mutter_read_logical_monitor_copy (const MutterReadLogicalMonitor* self,
                                       MutterReadLogicalMonitor* dest);
VALA_EXTERN void mutter_read_logical_monitor_destroy (MutterReadLogicalMonitor* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (MutterReadLogicalMonitor, mutter_read_logical_monitor_destroy)
VALA_EXTERN GType gala_daemon_display_config_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GalaDaemonDisplayConfig, g_object_unref)
VALA_EXTERN gboolean gala_daemon_display_config_is_logical_layout (void);
static void gala_daemon_display_config_init (void);
static void gala_daemon_display_config_update (void);
static void _gala_daemon_display_config_update_gala_daemon_display_config_monitors_changed (GalaDaemonDisplayConfig* _sender,
                                                                                     gpointer self);
static gboolean* _bool_dup (gboolean* self);
VALA_EXTERN void gala_daemon_display_config_get_current_state (GalaDaemonDisplayConfig* self,
                                                   guint* serial,
                                                   MutterReadMonitor** monitors,
                                                   gint* monitors_length1,
                                                   MutterReadLogicalMonitor** logical_monitors,
                                                   gint* logical_monitors_length1,
                                                   GHashTable** properties,
                                                   GError** error);
static void _vala_MutterReadMonitor_array_free (MutterReadMonitor * array,
                                         gssize array_length);
static void _vala_MutterReadLogicalMonitor_array_free (MutterReadLogicalMonitor * array,
                                                gssize array_length);
static GType gala_daemon_display_config_get_type_once (void);
static void gala_daemon_display_config_proxy_g_signal (GDBusProxy* proxy,
                                                const gchar* sender_name,
                                                const gchar* signal_name,
                                                GVariant* parameters);
static void _dbus_handle_gala_daemon_display_config_monitors_changed (GalaDaemonDisplayConfig* self,
                                                               GVariant* parameters);
static void gala_daemon_display_config_proxy_get_current_state (GalaDaemonDisplayConfig* self,
                                                         guint* serial,
                                                         MutterReadMonitor** monitors,
                                                         gint* monitors_length1,
                                                         MutterReadLogicalMonitor** logical_monitors,
                                                         gint* logical_monitors_length1,
                                                         GHashTable** properties,
                                                         GError** error);
static void gala_daemon_display_config_proxy_gala_daemon_display_config_interface_init (GalaDaemonDisplayConfigIface* iface);
static void _dbus_gala_daemon_display_config_get_current_state (GalaDaemonDisplayConfig* self,
                                                         GVariant* _parameters_,
                                                         GDBusMethodInvocation* invocation);
static void gala_daemon_display_config_dbus_interface_method_call (GDBusConnection* connection,
                                                            const gchar* sender,
                                                            const gchar* object_path,
                                                            const gchar* interface_name,
                                                            const gchar* method_name,
                                                            GVariant* parameters,
                                                            GDBusMethodInvocation* invocation,
                                                            gpointer user_data);
static GVariant* gala_daemon_display_config_dbus_interface_get_property (GDBusConnection* connection,
                                                                  const gchar* sender,
                                                                  const gchar* object_path,
                                                                  const gchar* interface_name,
                                                                  const gchar* property_name,
                                                                  GError** error,
                                                                  gpointer user_data);
static gboolean gala_daemon_display_config_dbus_interface_set_property (GDBusConnection* connection,
                                                                 const gchar* sender,
                                                                 const gchar* object_path,
                                                                 const gchar* interface_name,
                                                                 const gchar* property_name,
                                                                 GVariant* value,
                                                                 GError** error,
                                                                 gpointer user_data);
static void _dbus_gala_daemon_display_config_monitors_changed (GObject* _sender,
                                                        gpointer* _data);
static void _gala_daemon_display_config_unregister_object (gpointer user_data);
VALA_EXTERN guint mutter_read_monitor_info_get_hash (MutterReadMonitorInfo* self);
static gdouble* _vala_array_dup1 (gdouble* self,
                           gssize length);
static void _vala_MutterReadMonitorMode_array_free (MutterReadMonitorMode * array,
                                             gssize array_length);
static MutterReadMonitorMode* _vala_array_dup2 (MutterReadMonitorMode* self,
                                         gssize length);
static void _vala_MutterReadMonitorInfo_array_free (MutterReadMonitorInfo * array,
                                             gssize array_length);
static MutterReadMonitorInfo* _vala_array_dup3 (MutterReadMonitorInfo* self,
                                         gssize length);

static const GDBusArgInfo _gala_daemon_display_config_dbus_arg_info_get_current_state_serial = {-1, "serial", "u", NULL};
static const GDBusArgInfo _gala_daemon_display_config_dbus_arg_info_get_current_state_monitors = {-1, "monitors", "a((ssss)a(siiddada{sv})a{sv})", NULL};
static const GDBusArgInfo _gala_daemon_display_config_dbus_arg_info_get_current_state_logical_monitors = {-1, "logical_monitors", "a(iiduba(ssss)a{sv})", NULL};
static const GDBusArgInfo _gala_daemon_display_config_dbus_arg_info_get_current_state_properties = {-1, "properties", "a{sv}", NULL};
static const GDBusArgInfo * const _gala_daemon_display_config_dbus_arg_info_get_current_state_in[] = {NULL};
static const GDBusArgInfo * const _gala_daemon_display_config_dbus_arg_info_get_current_state_out[] = {&_gala_daemon_display_config_dbus_arg_info_get_current_state_serial, &_gala_daemon_display_config_dbus_arg_info_get_current_state_monitors, &_gala_daemon_display_config_dbus_arg_info_get_current_state_logical_monitors, &_gala_daemon_display_config_dbus_arg_info_get_current_state_properties, NULL};
static const GDBusMethodInfo _gala_daemon_display_config_dbus_method_info_get_current_state = {-1, "GetCurrentState", (GDBusArgInfo **) (&_gala_daemon_display_config_dbus_arg_info_get_current_state_in), (GDBusArgInfo **) (&_gala_daemon_display_config_dbus_arg_info_get_current_state_out), NULL};
static const GDBusMethodInfo * const _gala_daemon_display_config_dbus_method_info[] = {&_gala_daemon_display_config_dbus_method_info_get_current_state, NULL};
static const GDBusArgInfo * const _gala_daemon_display_config_dbus_arg_info_monitors_changed[] = {NULL};
static const GDBusSignalInfo _gala_daemon_display_config_dbus_signal_info_monitors_changed = {-1, "MonitorsChanged", (GDBusArgInfo **) (&_gala_daemon_display_config_dbus_arg_info_monitors_changed), NULL};
static const GDBusSignalInfo * const _gala_daemon_display_config_dbus_signal_info[] = {&_gala_daemon_display_config_dbus_signal_info_monitors_changed, NULL};
static const GDBusPropertyInfo * const _gala_daemon_display_config_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _gala_daemon_display_config_dbus_interface_info = {-1, "org.gnome.Mutter.DisplayConfig", (GDBusMethodInfo **) (&_gala_daemon_display_config_dbus_method_info), (GDBusSignalInfo **) (&_gala_daemon_display_config_dbus_signal_info), (GDBusPropertyInfo **) (&_gala_daemon_display_config_dbus_property_info), NULL};
static const GDBusInterfaceVTable _gala_daemon_display_config_dbus_interface_vtable = {gala_daemon_display_config_dbus_interface_method_call, gala_daemon_display_config_dbus_interface_get_property, gala_daemon_display_config_dbus_interface_set_property};

gboolean
gala_daemon_display_config_is_logical_layout (void)
{
	gboolean* _tmp0_;
	gboolean* _tmp1_;
	gboolean result;
	_tmp0_ = gala_daemon_display_config__is_logical_layout;
	if (_tmp0_ == NULL) {
		gala_daemon_display_config_init ();
	}
	_tmp1_ = gala_daemon_display_config__is_logical_layout;
	result = *_tmp1_;
	return result;
}

static void
_gala_daemon_display_config_update_gala_daemon_display_config_monitors_changed (GalaDaemonDisplayConfig* _sender,
                                                                                gpointer self)
{
	gala_daemon_display_config_update ();
}

static gboolean*
_bool_dup (gboolean* self)
{
	gboolean* dup;
	dup = g_new0 (gboolean, 1);
	memcpy (dup, self, sizeof (gboolean));
	return dup;
}

static gpointer
__bool_dup0 (gpointer self)
{
	return self ? _bool_dup (self) : NULL;
}

static void
gala_daemon_display_config_init (void)
{
	GError* _inner_error0_ = NULL;
	{
		GalaDaemonDisplayConfig* _tmp0_ = NULL;
		GalaDaemonDisplayConfig* _tmp1_;
		GalaDaemonDisplayConfig* _tmp2_;
		GalaDaemonDisplayConfig* _tmp3_;
		_tmp1_ = (GalaDaemonDisplayConfig*) g_initable_new (GALA_DAEMON_TYPE_DISPLAY_CONFIG_PROXY, NULL, &_inner_error0_, "g-flags", 0, "g-name", "org.gnome.Mutter.DisplayConfig", "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/gnome/Mutter/DisplayConfig", "g-interface-name", "org.gnome.Mutter.DisplayConfig", NULL);
		_tmp0_ = (GalaDaemonDisplayConfig*) _tmp1_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp2_ = _tmp0_;
		_tmp0_ = NULL;
		_g_object_unref0 (gala_daemon_display_config_proxy);
		gala_daemon_display_config_proxy = _tmp2_;
		_tmp3_ = gala_daemon_display_config_proxy;
		g_signal_connect (_tmp3_, "monitors-changed", (GCallback) _gala_daemon_display_config_update_gala_daemon_display_config_monitors_changed, NULL);
		_g_object_unref0 (_tmp0_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp4_;
		const gchar* _tmp5_;
		gboolean _tmp6_;
		gboolean* _tmp7_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp4_ = e;
		_tmp5_ = _tmp4_->message;
		g_critical ("DisplayConfig.vala:24: %s", _tmp5_);
		_tmp6_ = TRUE;
		_tmp7_ = __bool_dup0 (&_tmp6_);
		_g_free0 (gala_daemon_display_config__is_logical_layout);
		gala_daemon_display_config__is_logical_layout = _tmp7_;
		_g_error_free0 (e);
		return;
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		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;
	}
	gala_daemon_display_config_update ();
}

static void
_vala_MutterReadMonitor_array_free (MutterReadMonitor * array,
                                    gssize array_length)
{
	if (array != NULL) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			mutter_read_monitor_destroy (&array[i]);
		}
	}
	g_free (array);
}

static void
_vala_MutterReadLogicalMonitor_array_free (MutterReadLogicalMonitor * array,
                                           gssize array_length)
{
	if (array != NULL) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			mutter_read_logical_monitor_destroy (&array[i]);
		}
	}
	g_free (array);
}

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

static void
gala_daemon_display_config_update (void)
{
	guint current_serial = 0U;
	MutterReadMonitor* mutter_monitors = NULL;
	gint mutter_monitors_length1 = 0;
	gint _mutter_monitors_size_ = 0;
	MutterReadLogicalMonitor* mutter_logical_monitors = NULL;
	gint mutter_logical_monitors_length1 = 0;
	gint _mutter_logical_monitors_size_ = 0;
	GHashTable* properties = NULL;
	guint layout_mode = 0U;
	GVariant* layout_mode_variant = NULL;
	GHashTable* _tmp11_;
	gconstpointer _tmp12_;
	GVariant* _tmp13_;
	GVariant* _tmp14_;
	gboolean _tmp16_;
	gboolean* _tmp17_;
	GError* _inner_error0_ = NULL;
	{
		GalaDaemonDisplayConfig* _tmp0_;
		guint _tmp1_ = 0U;
		MutterReadMonitor* _tmp2_ = NULL;
		gint _tmp3_ = 0;
		MutterReadLogicalMonitor* _tmp4_ = NULL;
		gint _tmp5_ = 0;
		GHashTable* _tmp6_ = NULL;
		_tmp0_ = gala_daemon_display_config_proxy;
		gala_daemon_display_config_get_current_state (_tmp0_, &_tmp1_, &_tmp2_, &_tmp3_, &_tmp4_, &_tmp5_, &_tmp6_, &_inner_error0_);
		current_serial = _tmp1_;
		mutter_monitors = (_vala_MutterReadMonitor_array_free (mutter_monitors, mutter_monitors_length1), NULL);
		mutter_monitors = _tmp2_;
		mutter_monitors_length1 = _tmp3_;
		_mutter_monitors_size_ = mutter_monitors_length1;
		mutter_logical_monitors = (_vala_MutterReadLogicalMonitor_array_free (mutter_logical_monitors, mutter_logical_monitors_length1), NULL);
		mutter_logical_monitors = _tmp4_;
		mutter_logical_monitors_length1 = _tmp5_;
		_mutter_logical_monitors_size_ = mutter_logical_monitors_length1;
		_g_hash_table_unref0 (properties);
		properties = _tmp6_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp7_;
		const gchar* _tmp8_;
		gboolean _tmp9_;
		gboolean* _tmp10_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp7_ = e;
		_tmp8_ = _tmp7_->message;
		g_critical ("DisplayConfig.vala:40: %s", _tmp8_);
		_tmp9_ = TRUE;
		_tmp10_ = __bool_dup0 (&_tmp9_);
		_g_free0 (gala_daemon_display_config__is_logical_layout);
		gala_daemon_display_config__is_logical_layout = _tmp10_;
		_g_error_free0 (e);
		_g_hash_table_unref0 (properties);
		mutter_logical_monitors = (_vala_MutterReadLogicalMonitor_array_free (mutter_logical_monitors, mutter_logical_monitors_length1), NULL);
		mutter_monitors = (_vala_MutterReadMonitor_array_free (mutter_monitors, mutter_monitors_length1), NULL);
		return;
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_hash_table_unref0 (properties);
		mutter_logical_monitors = (_vala_MutterReadLogicalMonitor_array_free (mutter_logical_monitors, mutter_logical_monitors_length1), NULL);
		mutter_monitors = (_vala_MutterReadMonitor_array_free (mutter_monitors, mutter_monitors_length1), NULL);
		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;
	}
	layout_mode = (guint) 1;
	_tmp11_ = properties;
	_tmp12_ = g_hash_table_lookup (_tmp11_, "layout-mode");
	_tmp13_ = _g_variant_ref0 ((GVariant*) _tmp12_);
	layout_mode_variant = _tmp13_;
	_tmp14_ = layout_mode_variant;
	if (_tmp14_ != NULL) {
		GVariant* _tmp15_;
		_tmp15_ = layout_mode_variant;
		layout_mode = (guint) g_variant_get_uint32 (_tmp15_);
	}
	_tmp16_ = layout_mode == ((guint) 1);
	_tmp17_ = __bool_dup0 (&_tmp16_);
	_g_free0 (gala_daemon_display_config__is_logical_layout);
	gala_daemon_display_config__is_logical_layout = _tmp17_;
	_g_variant_unref0 (layout_mode_variant);
	_g_hash_table_unref0 (properties);
	mutter_logical_monitors = (_vala_MutterReadLogicalMonitor_array_free (mutter_logical_monitors, mutter_logical_monitors_length1), NULL);
	mutter_monitors = (_vala_MutterReadMonitor_array_free (mutter_monitors, mutter_monitors_length1), NULL);
}

void
gala_daemon_display_config_get_current_state (GalaDaemonDisplayConfig* self,
                                              guint* serial,
                                              MutterReadMonitor** monitors,
                                              gint* monitors_length1,
                                              MutterReadLogicalMonitor** logical_monitors,
                                              gint* logical_monitors_length1,
                                              GHashTable** properties,
                                              GError** error)
{
	GalaDaemonDisplayConfigIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GALA_DAEMON_DISPLAY_CONFIG_GET_INTERFACE (self);
	if (_iface_->get_current_state) {
		_iface_->get_current_state (self, serial, monitors, monitors_length1, logical_monitors, logical_monitors_length1, properties, error);
	}
}

static void
gala_daemon_display_config_default_init (GalaDaemonDisplayConfigIface * iface,
                                         gpointer iface_data)
{
	gala_daemon_display_config_signals[GALA_DAEMON_DISPLAY_CONFIG_MONITORS_CHANGED_SIGNAL] = g_signal_new ("monitors-changed", GALA_DAEMON_TYPE_DISPLAY_CONFIG, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

 G_GNUC_NO_INLINE static GType
gala_daemon_display_config_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GalaDaemonDisplayConfigIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gala_daemon_display_config_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType gala_daemon_display_config_type_id;
	gala_daemon_display_config_type_id = g_type_register_static (G_TYPE_INTERFACE, "GalaDaemonDisplayConfig", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (gala_daemon_display_config_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (gala_daemon_display_config_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) gala_daemon_display_config_proxy_get_type);
	g_type_set_qdata (gala_daemon_display_config_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.gnome.Mutter.DisplayConfig");
	g_type_set_qdata (gala_daemon_display_config_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_gala_daemon_display_config_dbus_interface_info));
	g_type_set_qdata (gala_daemon_display_config_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) gala_daemon_display_config_register_object);
	return gala_daemon_display_config_type_id;
}

GType
gala_daemon_display_config_get_type (void)
{
	static gsize gala_daemon_display_config_type_id__once = 0;
	if (g_once_init_enter (&gala_daemon_display_config_type_id__once)) {
		GType gala_daemon_display_config_type_id;
		gala_daemon_display_config_type_id = gala_daemon_display_config_get_type_once ();
		g_once_init_leave (&gala_daemon_display_config_type_id__once, gala_daemon_display_config_type_id);
	}
	return gala_daemon_display_config_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (GalaDaemonDisplayConfigProxy, gala_daemon_display_config_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (GALA_DAEMON_TYPE_DISPLAY_CONFIG, gala_daemon_display_config_proxy_gala_daemon_display_config_interface_init) )
static void
gala_daemon_display_config_proxy_class_init (GalaDaemonDisplayConfigProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = gala_daemon_display_config_proxy_g_signal;
}

static void
_dbus_handle_gala_daemon_display_config_monitors_changed (GalaDaemonDisplayConfig* self,
                                                          GVariant* parameters)
{
	GVariantIter _arguments_iter;
	g_variant_iter_init (&_arguments_iter, parameters);
	g_signal_emit_by_name (self, "monitors-changed");
}

static void
gala_daemon_display_config_proxy_g_signal (GDBusProxy* proxy,
                                           const gchar* sender_name,
                                           const gchar* signal_name,
                                           GVariant* parameters)
{
	if (strcmp (signal_name, "MonitorsChanged") == 0) {
		_dbus_handle_gala_daemon_display_config_monitors_changed ((GalaDaemonDisplayConfig*) proxy, parameters);
	}
}

static void
gala_daemon_display_config_proxy_init (GalaDaemonDisplayConfigProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_gala_daemon_display_config_dbus_interface_info));
}

static void
gala_daemon_display_config_proxy_get_current_state (GalaDaemonDisplayConfig* self,
                                                    guint* serial,
                                                    MutterReadMonitor** monitors,
                                                    gint* monitors_length1,
                                                    MutterReadLogicalMonitor** logical_monitors,
                                                    gint* logical_monitors_length1,
                                                    GHashTable** properties,
                                                    GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	guint _vala_serial = 0U;
	GVariant* _tmp0_;
	MutterReadMonitor* _vala_monitors = NULL;
	gint _vala_monitors_length1;
	GVariant* _tmp1_;
	MutterReadMonitor* _tmp2_;
	gint _tmp2__length;
	gint _tmp2__size;
	gint _tmp2__length1;
	GVariantIter _tmp3_;
	GVariant* _tmp4_;
	MutterReadLogicalMonitor* _vala_logical_monitors = NULL;
	gint _vala_logical_monitors_length1;
	GVariant* _tmp39_;
	MutterReadLogicalMonitor* _tmp40_;
	gint _tmp40__length;
	gint _tmp40__size;
	gint _tmp40__length1;
	GVariantIter _tmp41_;
	GVariant* _tmp42_;
	GHashTable* _vala_properties = NULL;
	GVariant* _tmp65_;
	GHashTable* _tmp66_;
	GVariantIter _tmp67_;
	GVariant* _tmp68_;
	GVariant* _tmp69_;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.Mutter.DisplayConfig", "GetCurrentState");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp0_ = g_variant_iter_next_value (&_reply_iter);
	_vala_serial = g_variant_get_uint32 (_tmp0_);
	g_variant_unref (_tmp0_);
	*serial = _vala_serial;
	_vala_monitors_length1 = 0;
	_tmp1_ = g_variant_iter_next_value (&_reply_iter);
	_tmp2_ = g_new (MutterReadMonitor, 5);
	_tmp2__length = 0;
	_tmp2__size = 4;
	_tmp2__length1 = 0;
	g_variant_iter_init (&_tmp3_, _tmp1_);
	for (; (_tmp4_ = g_variant_iter_next_value (&_tmp3_)) != NULL; _tmp2__length1++) {
		MutterReadMonitor _tmp5_;
		GVariantIter _tmp6_;
		GVariant* _tmp7_;
		MutterReadMonitorInfo _tmp8_;
		GVariantIter _tmp9_;
		GVariant* _tmp10_;
		GVariant* _tmp11_;
		GVariant* _tmp12_;
		GVariant* _tmp13_;
		GVariant* _tmp14_;
		MutterReadMonitorMode* _tmp15_;
		gint _tmp15__length;
		gint _tmp15__size;
		gint _tmp15__length1;
		GVariantIter _tmp16_;
		GVariant* _tmp17_;
		GVariant* _tmp34_;
		GHashTable* _tmp35_;
		GVariantIter _tmp36_;
		GVariant* _tmp37_;
		GVariant* _tmp38_;
		if (_tmp2__size == _tmp2__length) {
			_tmp2__size = 2 * _tmp2__size;
			_tmp2_ = g_renew (MutterReadMonitor, _tmp2_, _tmp2__size + 1);
		}
		g_variant_iter_init (&_tmp6_, _tmp4_);
		_tmp7_ = g_variant_iter_next_value (&_tmp6_);
		g_variant_iter_init (&_tmp9_, _tmp7_);
		_tmp10_ = g_variant_iter_next_value (&_tmp9_);
		_tmp8_.connector = g_variant_dup_string (_tmp10_, NULL);
		g_variant_unref (_tmp10_);
		_tmp11_ = g_variant_iter_next_value (&_tmp9_);
		_tmp8_.vendor = g_variant_dup_string (_tmp11_, NULL);
		g_variant_unref (_tmp11_);
		_tmp12_ = g_variant_iter_next_value (&_tmp9_);
		_tmp8_.product = g_variant_dup_string (_tmp12_, NULL);
		g_variant_unref (_tmp12_);
		_tmp13_ = g_variant_iter_next_value (&_tmp9_);
		_tmp8_.serial = g_variant_dup_string (_tmp13_, NULL);
		g_variant_unref (_tmp13_);
		_tmp5_.monitor = _tmp8_;
		g_variant_unref (_tmp7_);
		_tmp14_ = g_variant_iter_next_value (&_tmp6_);
		_tmp15_ = g_new (MutterReadMonitorMode, 5);
		_tmp15__length = 0;
		_tmp15__size = 4;
		_tmp15__length1 = 0;
		g_variant_iter_init (&_tmp16_, _tmp14_);
		for (; (_tmp17_ = g_variant_iter_next_value (&_tmp16_)) != NULL; _tmp15__length1++) {
			MutterReadMonitorMode _tmp18_;
			GVariantIter _tmp19_;
			GVariant* _tmp20_;
			GVariant* _tmp21_;
			GVariant* _tmp22_;
			GVariant* _tmp23_;
			GVariant* _tmp24_;
			GVariant* _tmp25_;
			gdouble* _tmp26_;
			gint _tmp26__length;
			gint _tmp26__size;
			gint _tmp26__length1;
			GVariantIter _tmp27_;
			GVariant* _tmp28_;
			GVariant* _tmp29_;
			GHashTable* _tmp30_;
			GVariantIter _tmp31_;
			GVariant* _tmp32_;
			GVariant* _tmp33_;
			if (_tmp15__size == _tmp15__length) {
				_tmp15__size = 2 * _tmp15__size;
				_tmp15_ = g_renew (MutterReadMonitorMode, _tmp15_, _tmp15__size + 1);
			}
			g_variant_iter_init (&_tmp19_, _tmp17_);
			_tmp20_ = g_variant_iter_next_value (&_tmp19_);
			_tmp18_.id = g_variant_dup_string (_tmp20_, NULL);
			g_variant_unref (_tmp20_);
			_tmp21_ = g_variant_iter_next_value (&_tmp19_);
			_tmp18_.width = g_variant_get_int32 (_tmp21_);
			g_variant_unref (_tmp21_);
			_tmp22_ = g_variant_iter_next_value (&_tmp19_);
			_tmp18_.height = g_variant_get_int32 (_tmp22_);
			g_variant_unref (_tmp22_);
			_tmp23_ = g_variant_iter_next_value (&_tmp19_);
			_tmp18_.frequency = g_variant_get_double (_tmp23_);
			g_variant_unref (_tmp23_);
			_tmp24_ = g_variant_iter_next_value (&_tmp19_);
			_tmp18_.preferred_scale = g_variant_get_double (_tmp24_);
			g_variant_unref (_tmp24_);
			_tmp25_ = g_variant_iter_next_value (&_tmp19_);
			_tmp26_ = g_new (gdouble, 5);
			_tmp26__length = 0;
			_tmp26__size = 4;
			_tmp26__length1 = 0;
			g_variant_iter_init (&_tmp27_, _tmp25_);
			for (; (_tmp28_ = g_variant_iter_next_value (&_tmp27_)) != NULL; _tmp26__length1++) {
				if (_tmp26__size == _tmp26__length) {
					_tmp26__size = 2 * _tmp26__size;
					_tmp26_ = g_renew (gdouble, _tmp26_, _tmp26__size + 1);
				}
				_tmp26_[_tmp26__length++] = g_variant_get_double (_tmp28_);
				g_variant_unref (_tmp28_);
			}
			_tmp18_.supported_scales_length1 = _tmp26__length1;
			_tmp18_.supported_scales = _tmp26_;
			g_variant_unref (_tmp25_);
			_tmp29_ = g_variant_iter_next_value (&_tmp19_);
			_tmp30_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref);
			g_variant_iter_init (&_tmp31_, _tmp29_);
			while (g_variant_iter_loop (&_tmp31_, "{?*}", &_tmp32_, &_tmp33_)) {
				g_hash_table_insert (_tmp30_, g_variant_dup_string (_tmp32_, NULL), g_variant_get_variant (_tmp33_));
			}
			_tmp18_.properties = _tmp30_;
			g_variant_unref (_tmp29_);
			_tmp15_[_tmp15__length++] = _tmp18_;
			g_variant_unref (_tmp17_);
		}
		_tmp5_.modes_length1 = _tmp15__length1;
		_tmp5_.modes = _tmp15_;
		g_variant_unref (_tmp14_);
		_tmp34_ = g_variant_iter_next_value (&_tmp6_);
		_tmp35_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref);
		g_variant_iter_init (&_tmp36_, _tmp34_);
		while (g_variant_iter_loop (&_tmp36_, "{?*}", &_tmp37_, &_tmp38_)) {
			g_hash_table_insert (_tmp35_, g_variant_dup_string (_tmp37_, NULL), g_variant_get_variant (_tmp38_));
		}
		_tmp5_.properties = _tmp35_;
		g_variant_unref (_tmp34_);
		_tmp2_[_tmp2__length++] = _tmp5_;
		g_variant_unref (_tmp4_);
	}
	_vala_monitors_length1 = _tmp2__length1;
	_vala_monitors = _tmp2_;
	g_variant_unref (_tmp1_);
	*monitors = _vala_monitors;
	*monitors_length1 = _vala_monitors_length1;
	_vala_logical_monitors_length1 = 0;
	_tmp39_ = g_variant_iter_next_value (&_reply_iter);
	_tmp40_ = g_new (MutterReadLogicalMonitor, 5);
	_tmp40__length = 0;
	_tmp40__size = 4;
	_tmp40__length1 = 0;
	g_variant_iter_init (&_tmp41_, _tmp39_);
	for (; (_tmp42_ = g_variant_iter_next_value (&_tmp41_)) != NULL; _tmp40__length1++) {
		MutterReadLogicalMonitor _tmp43_;
		GVariantIter _tmp44_;
		GVariant* _tmp45_;
		GVariant* _tmp46_;
		GVariant* _tmp47_;
		GVariant* _tmp48_;
		GVariant* _tmp49_;
		GVariant* _tmp50_;
		MutterReadMonitorInfo* _tmp51_;
		gint _tmp51__length;
		gint _tmp51__size;
		gint _tmp51__length1;
		GVariantIter _tmp52_;
		GVariant* _tmp53_;
		GVariant* _tmp60_;
		GHashTable* _tmp61_;
		GVariantIter _tmp62_;
		GVariant* _tmp63_;
		GVariant* _tmp64_;
		if (_tmp40__size == _tmp40__length) {
			_tmp40__size = 2 * _tmp40__size;
			_tmp40_ = g_renew (MutterReadLogicalMonitor, _tmp40_, _tmp40__size + 1);
		}
		g_variant_iter_init (&_tmp44_, _tmp42_);
		_tmp45_ = g_variant_iter_next_value (&_tmp44_);
		_tmp43_.x = g_variant_get_int32 (_tmp45_);
		g_variant_unref (_tmp45_);
		_tmp46_ = g_variant_iter_next_value (&_tmp44_);
		_tmp43_.y = g_variant_get_int32 (_tmp46_);
		g_variant_unref (_tmp46_);
		_tmp47_ = g_variant_iter_next_value (&_tmp44_);
		_tmp43_.scale = g_variant_get_double (_tmp47_);
		g_variant_unref (_tmp47_);
		_tmp48_ = g_variant_iter_next_value (&_tmp44_);
		_tmp43_.transform = g_variant_get_uint32 (_tmp48_);
		g_variant_unref (_tmp48_);
		_tmp49_ = g_variant_iter_next_value (&_tmp44_);
		_tmp43_.primary = g_variant_get_boolean (_tmp49_);
		g_variant_unref (_tmp49_);
		_tmp50_ = g_variant_iter_next_value (&_tmp44_);
		_tmp51_ = g_new (MutterReadMonitorInfo, 5);
		_tmp51__length = 0;
		_tmp51__size = 4;
		_tmp51__length1 = 0;
		g_variant_iter_init (&_tmp52_, _tmp50_);
		for (; (_tmp53_ = g_variant_iter_next_value (&_tmp52_)) != NULL; _tmp51__length1++) {
			MutterReadMonitorInfo _tmp54_;
			GVariantIter _tmp55_;
			GVariant* _tmp56_;
			GVariant* _tmp57_;
			GVariant* _tmp58_;
			GVariant* _tmp59_;
			if (_tmp51__size == _tmp51__length) {
				_tmp51__size = 2 * _tmp51__size;
				_tmp51_ = g_renew (MutterReadMonitorInfo, _tmp51_, _tmp51__size + 1);
			}
			g_variant_iter_init (&_tmp55_, _tmp53_);
			_tmp56_ = g_variant_iter_next_value (&_tmp55_);
			_tmp54_.connector = g_variant_dup_string (_tmp56_, NULL);
			g_variant_unref (_tmp56_);
			_tmp57_ = g_variant_iter_next_value (&_tmp55_);
			_tmp54_.vendor = g_variant_dup_string (_tmp57_, NULL);
			g_variant_unref (_tmp57_);
			_tmp58_ = g_variant_iter_next_value (&_tmp55_);
			_tmp54_.product = g_variant_dup_string (_tmp58_, NULL);
			g_variant_unref (_tmp58_);
			_tmp59_ = g_variant_iter_next_value (&_tmp55_);
			_tmp54_.serial = g_variant_dup_string (_tmp59_, NULL);
			g_variant_unref (_tmp59_);
			_tmp51_[_tmp51__length++] = _tmp54_;
			g_variant_unref (_tmp53_);
		}
		_tmp43_.monitors_length1 = _tmp51__length1;
		_tmp43_.monitors = _tmp51_;
		g_variant_unref (_tmp50_);
		_tmp60_ = g_variant_iter_next_value (&_tmp44_);
		_tmp61_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref);
		g_variant_iter_init (&_tmp62_, _tmp60_);
		while (g_variant_iter_loop (&_tmp62_, "{?*}", &_tmp63_, &_tmp64_)) {
			g_hash_table_insert (_tmp61_, g_variant_dup_string (_tmp63_, NULL), g_variant_get_variant (_tmp64_));
		}
		_tmp43_.properties = _tmp61_;
		g_variant_unref (_tmp60_);
		_tmp40_[_tmp40__length++] = _tmp43_;
		g_variant_unref (_tmp42_);
	}
	_vala_logical_monitors_length1 = _tmp40__length1;
	_vala_logical_monitors = _tmp40_;
	g_variant_unref (_tmp39_);
	*logical_monitors = _vala_logical_monitors;
	*logical_monitors_length1 = _vala_logical_monitors_length1;
	_tmp65_ = g_variant_iter_next_value (&_reply_iter);
	_tmp66_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref);
	g_variant_iter_init (&_tmp67_, _tmp65_);
	while (g_variant_iter_loop (&_tmp67_, "{?*}", &_tmp68_, &_tmp69_)) {
		g_hash_table_insert (_tmp66_, g_variant_dup_string (_tmp68_, NULL), g_variant_get_variant (_tmp69_));
	}
	_vala_properties = _tmp66_;
	g_variant_unref (_tmp65_);
	*properties = _vala_properties;
	g_object_unref (_reply_message);
}

static void
gala_daemon_display_config_proxy_gala_daemon_display_config_interface_init (GalaDaemonDisplayConfigIface* iface)
{
	iface->get_current_state = gala_daemon_display_config_proxy_get_current_state;
}

static void
_dbus_gala_daemon_display_config_get_current_state (GalaDaemonDisplayConfig* self,
                                                    GVariant* _parameters_,
                                                    GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	guint serial = 0U;
	MutterReadMonitor* monitors = NULL;
	gint monitors_length1 = 0;
	MutterReadMonitor* _tmp70_;
	GVariantBuilder _tmp71_;
	gint _tmp72_;
	MutterReadLogicalMonitor* logical_monitors = NULL;
	gint logical_monitors_length1 = 0;
	MutterReadLogicalMonitor* _tmp90_;
	GVariantBuilder _tmp91_;
	gint _tmp92_;
	GHashTable* properties = NULL;
	GVariantBuilder _tmp102_;
	GHashTableIter _tmp103_;
	gpointer _tmp104_;
	gpointer _tmp105_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	gala_daemon_display_config_get_current_state (self, &serial, &monitors, &monitors_length1, &logical_monitors, &logical_monitors_length1, &properties, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_reply_builder, g_variant_new_uint32 (serial));
	_tmp70_ = monitors;
	g_variant_builder_init (&_tmp71_, G_VARIANT_TYPE ("a((ssss)a(siiddada{sv})a{sv})"));
	for (_tmp72_ = 0; _tmp72_ < monitors_length1; _tmp72_++) {
		GVariantBuilder _tmp73_;
		GVariantBuilder _tmp74_;
		MutterReadMonitorMode* _tmp75_;
		GVariantBuilder _tmp76_;
		gint _tmp77_;
		GVariantBuilder _tmp86_;
		GHashTableIter _tmp87_;
		gpointer _tmp88_;
		gpointer _tmp89_;
		g_variant_builder_init (&_tmp73_, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_init (&_tmp74_, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_tmp74_, g_variant_new_string ((*_tmp70_).monitor.connector));
		g_variant_builder_add_value (&_tmp74_, g_variant_new_string ((*_tmp70_).monitor.vendor));
		g_variant_builder_add_value (&_tmp74_, g_variant_new_string ((*_tmp70_).monitor.product));
		g_variant_builder_add_value (&_tmp74_, g_variant_new_string ((*_tmp70_).monitor.serial));
		g_variant_builder_add_value (&_tmp73_, g_variant_builder_end (&_tmp74_));
		_tmp75_ = (*_tmp70_).modes;
		g_variant_builder_init (&_tmp76_, G_VARIANT_TYPE ("a(siiddada{sv})"));
		for (_tmp77_ = 0; _tmp77_ < (*_tmp70_).modes_length1; _tmp77_++) {
			GVariantBuilder _tmp78_;
			gdouble* _tmp79_;
			GVariantBuilder _tmp80_;
			gint _tmp81_;
			GVariantBuilder _tmp82_;
			GHashTableIter _tmp83_;
			gpointer _tmp84_;
			gpointer _tmp85_;
			g_variant_builder_init (&_tmp78_, G_VARIANT_TYPE_TUPLE);
			g_variant_builder_add_value (&_tmp78_, g_variant_new_string ((*_tmp75_).id));
			g_variant_builder_add_value (&_tmp78_, g_variant_new_int32 ((*_tmp75_).width));
			g_variant_builder_add_value (&_tmp78_, g_variant_new_int32 ((*_tmp75_).height));
			g_variant_builder_add_value (&_tmp78_, g_variant_new_double ((*_tmp75_).frequency));
			g_variant_builder_add_value (&_tmp78_, g_variant_new_double ((*_tmp75_).preferred_scale));
			_tmp79_ = (*_tmp75_).supported_scales;
			g_variant_builder_init (&_tmp80_, G_VARIANT_TYPE ("ad"));
			for (_tmp81_ = 0; _tmp81_ < (*_tmp75_).supported_scales_length1; _tmp81_++) {
				g_variant_builder_add_value (&_tmp80_, g_variant_new_double (*_tmp79_));
				_tmp79_++;
			}
			g_variant_builder_add_value (&_tmp78_, g_variant_builder_end (&_tmp80_));
			g_hash_table_iter_init (&_tmp83_, (*_tmp75_).properties);
			g_variant_builder_init (&_tmp82_, G_VARIANT_TYPE ("a{sv}"));
			while (g_hash_table_iter_next (&_tmp83_, &_tmp84_, &_tmp85_)) {
				gchar* _key;
				GVariant* _value;
				_key = (gchar*) _tmp84_;
				_value = (GVariant*) _tmp85_;
				g_variant_builder_add (&_tmp82_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
			}
			g_variant_builder_add_value (&_tmp78_, g_variant_builder_end (&_tmp82_));
			g_variant_builder_add_value (&_tmp76_, g_variant_builder_end (&_tmp78_));
			_tmp75_++;
		}
		g_variant_builder_add_value (&_tmp73_, g_variant_builder_end (&_tmp76_));
		g_hash_table_iter_init (&_tmp87_, (*_tmp70_).properties);
		g_variant_builder_init (&_tmp86_, G_VARIANT_TYPE ("a{sv}"));
		while (g_hash_table_iter_next (&_tmp87_, &_tmp88_, &_tmp89_)) {
			gchar* _key;
			GVariant* _value;
			_key = (gchar*) _tmp88_;
			_value = (GVariant*) _tmp89_;
			g_variant_builder_add (&_tmp86_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
		}
		g_variant_builder_add_value (&_tmp73_, g_variant_builder_end (&_tmp86_));
		g_variant_builder_add_value (&_tmp71_, g_variant_builder_end (&_tmp73_));
		_tmp70_++;
	}
	g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp71_));
	_tmp90_ = logical_monitors;
	g_variant_builder_init (&_tmp91_, G_VARIANT_TYPE ("a(iiduba(ssss)a{sv})"));
	for (_tmp92_ = 0; _tmp92_ < logical_monitors_length1; _tmp92_++) {
		GVariantBuilder _tmp93_;
		MutterReadMonitorInfo* _tmp94_;
		GVariantBuilder _tmp95_;
		gint _tmp96_;
		GVariantBuilder _tmp98_;
		GHashTableIter _tmp99_;
		gpointer _tmp100_;
		gpointer _tmp101_;
		g_variant_builder_init (&_tmp93_, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_tmp93_, g_variant_new_int32 ((*_tmp90_).x));
		g_variant_builder_add_value (&_tmp93_, g_variant_new_int32 ((*_tmp90_).y));
		g_variant_builder_add_value (&_tmp93_, g_variant_new_double ((*_tmp90_).scale));
		g_variant_builder_add_value (&_tmp93_, g_variant_new_uint32 ((*_tmp90_).transform));
		g_variant_builder_add_value (&_tmp93_, g_variant_new_boolean ((*_tmp90_).primary));
		_tmp94_ = (*_tmp90_).monitors;
		g_variant_builder_init (&_tmp95_, G_VARIANT_TYPE ("a(ssss)"));
		for (_tmp96_ = 0; _tmp96_ < (*_tmp90_).monitors_length1; _tmp96_++) {
			GVariantBuilder _tmp97_;
			g_variant_builder_init (&_tmp97_, G_VARIANT_TYPE_TUPLE);
			g_variant_builder_add_value (&_tmp97_, g_variant_new_string ((*_tmp94_).connector));
			g_variant_builder_add_value (&_tmp97_, g_variant_new_string ((*_tmp94_).vendor));
			g_variant_builder_add_value (&_tmp97_, g_variant_new_string ((*_tmp94_).product));
			g_variant_builder_add_value (&_tmp97_, g_variant_new_string ((*_tmp94_).serial));
			g_variant_builder_add_value (&_tmp95_, g_variant_builder_end (&_tmp97_));
			_tmp94_++;
		}
		g_variant_builder_add_value (&_tmp93_, g_variant_builder_end (&_tmp95_));
		g_hash_table_iter_init (&_tmp99_, (*_tmp90_).properties);
		g_variant_builder_init (&_tmp98_, G_VARIANT_TYPE ("a{sv}"));
		while (g_hash_table_iter_next (&_tmp99_, &_tmp100_, &_tmp101_)) {
			gchar* _key;
			GVariant* _value;
			_key = (gchar*) _tmp100_;
			_value = (GVariant*) _tmp101_;
			g_variant_builder_add (&_tmp98_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
		}
		g_variant_builder_add_value (&_tmp93_, g_variant_builder_end (&_tmp98_));
		g_variant_builder_add_value (&_tmp91_, g_variant_builder_end (&_tmp93_));
		_tmp90_++;
	}
	g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp91_));
	g_hash_table_iter_init (&_tmp103_, properties);
	g_variant_builder_init (&_tmp102_, G_VARIANT_TYPE ("a{sv}"));
	while (g_hash_table_iter_next (&_tmp103_, &_tmp104_, &_tmp105_)) {
		gchar* _key;
		GVariant* _value;
		_key = (gchar*) _tmp104_;
		_value = (GVariant*) _tmp105_;
		g_variant_builder_add (&_tmp102_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
	}
	g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp102_));
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	monitors = (_vala_MutterReadMonitor_array_free (monitors, monitors_length1), NULL);
	logical_monitors = (_vala_MutterReadLogicalMonitor_array_free (logical_monitors, logical_monitors_length1), NULL);
	_g_hash_table_unref0 (properties);
}

static void
gala_daemon_display_config_dbus_interface_method_call (GDBusConnection* connection,
                                                       const gchar* sender,
                                                       const gchar* object_path,
                                                       const gchar* interface_name,
                                                       const gchar* method_name,
                                                       GVariant* parameters,
                                                       GDBusMethodInvocation* invocation,
                                                       gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (method_name, "GetCurrentState") == 0) {
		_dbus_gala_daemon_display_config_get_current_state (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
gala_daemon_display_config_dbus_interface_get_property (GDBusConnection* connection,
                                                        const gchar* sender,
                                                        const gchar* object_path,
                                                        const gchar* interface_name,
                                                        const gchar* property_name,
                                                        GError** error,
                                                        gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	return NULL;
}

static gboolean
gala_daemon_display_config_dbus_interface_set_property (GDBusConnection* connection,
                                                        const gchar* sender,
                                                        const gchar* object_path,
                                                        const gchar* interface_name,
                                                        const gchar* property_name,
                                                        GVariant* value,
                                                        GError** error,
                                                        gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	return FALSE;
}

static void
_dbus_gala_daemon_display_config_monitors_changed (GObject* _sender,
                                                   gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.gnome.Mutter.DisplayConfig", "MonitorsChanged", _arguments, NULL);
}

guint
gala_daemon_display_config_register_object (gpointer object,
                                            GDBusConnection* connection,
                                            const gchar* path,
                                            GError** error)
{
	guint result;
	gpointer *data;
	data = g_new (gpointer, 3);
	data[0] = g_object_ref (object);
	data[1] = g_object_ref (connection);
	data[2] = g_strdup (path);
	result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_gala_daemon_display_config_dbus_interface_info), &_gala_daemon_display_config_dbus_interface_vtable, data, _gala_daemon_display_config_unregister_object, error);
	if (!result) {
		return 0;
	}
	g_signal_connect (object, "monitors-changed", (GCallback) _dbus_gala_daemon_display_config_monitors_changed, data);
	return result;
}

static void
_gala_daemon_display_config_unregister_object (gpointer user_data)
{
	gpointer* data;
	data = user_data;
	g_signal_handlers_disconnect_by_func (data[0], _dbus_gala_daemon_display_config_monitors_changed, data);
	g_object_unref (data[0]);
	g_object_unref (data[1]);
	g_free (data[2]);
	g_free (data);
}

guint
mutter_read_monitor_info_get_hash (MutterReadMonitorInfo* self)
{
	guint result;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	const gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	guint _tmp10_;
	g_return_val_if_fail (self != NULL, 0U);
	_tmp0_ = (*self).connector;
	_tmp1_ = (*self).vendor;
	_tmp2_ = g_strconcat (_tmp0_, _tmp1_, NULL);
	_tmp3_ = _tmp2_;
	_tmp4_ = (*self).product;
	_tmp5_ = g_strconcat (_tmp3_, _tmp4_, NULL);
	_tmp6_ = _tmp5_;
	_tmp7_ = (*self).serial;
	_tmp8_ = g_strconcat (_tmp6_, _tmp7_, NULL);
	_tmp9_ = _tmp8_;
	_tmp10_ = g_str_hash (_tmp9_);
	_g_free0 (_tmp9_);
	_g_free0 (_tmp6_);
	_g_free0 (_tmp3_);
	result = _tmp10_;
	return result;
}

void
mutter_read_monitor_info_copy (const MutterReadMonitorInfo* self,
                               MutterReadMonitorInfo* dest)
{
	const gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	_tmp0_ = (*self).connector;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 ((*dest).connector);
	(*dest).connector = _tmp1_;
	_tmp2_ = (*self).vendor;
	_tmp3_ = g_strdup (_tmp2_);
	_g_free0 ((*dest).vendor);
	(*dest).vendor = _tmp3_;
	_tmp4_ = (*self).product;
	_tmp5_ = g_strdup (_tmp4_);
	_g_free0 ((*dest).product);
	(*dest).product = _tmp5_;
	_tmp6_ = (*self).serial;
	_tmp7_ = g_strdup (_tmp6_);
	_g_free0 ((*dest).serial);
	(*dest).serial = _tmp7_;
}

void
mutter_read_monitor_info_destroy (MutterReadMonitorInfo* self)
{
	_g_free0 ((*self).connector);
	_g_free0 ((*self).vendor);
	_g_free0 ((*self).product);
	_g_free0 ((*self).serial);
}

MutterReadMonitorInfo*
mutter_read_monitor_info_dup (const MutterReadMonitorInfo* self)
{
	MutterReadMonitorInfo* dup;
	dup = g_new0 (MutterReadMonitorInfo, 1);
	mutter_read_monitor_info_copy (self, dup);
	return dup;
}

void
mutter_read_monitor_info_free (MutterReadMonitorInfo* self)
{
	mutter_read_monitor_info_destroy (self);
	g_free (self);
}

 G_GNUC_NO_INLINE static GType
mutter_read_monitor_info_get_type_once (void)
{
	GType mutter_read_monitor_info_type_id;
	mutter_read_monitor_info_type_id = g_boxed_type_register_static ("MutterReadMonitorInfo", (GBoxedCopyFunc) mutter_read_monitor_info_dup, (GBoxedFreeFunc) mutter_read_monitor_info_free);
	return mutter_read_monitor_info_type_id;
}

GType
mutter_read_monitor_info_get_type (void)
{
	static gsize mutter_read_monitor_info_type_id__once = 0;
	if (g_once_init_enter (&mutter_read_monitor_info_type_id__once)) {
		GType mutter_read_monitor_info_type_id;
		mutter_read_monitor_info_type_id = mutter_read_monitor_info_get_type_once ();
		g_once_init_leave (&mutter_read_monitor_info_type_id__once, mutter_read_monitor_info_type_id);
	}
	return mutter_read_monitor_info_type_id__once;
}

static gdouble*
_vala_array_dup1 (gdouble* self,
                  gssize length)
{
	if (length > 0) {
		return g_memdup2 (self, length * sizeof (gdouble));
	}
	return NULL;
}

static gpointer
_g_hash_table_ref0 (gpointer self)
{
	return self ? g_hash_table_ref (self) : NULL;
}

void
mutter_read_monitor_mode_copy (const MutterReadMonitorMode* self,
                               MutterReadMonitorMode* dest)
{
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gdouble* _tmp2_;
	gint _tmp2__length1;
	gdouble* _tmp3_;
	gint _tmp3__length1;
	GHashTable* _tmp4_;
	GHashTable* _tmp5_;
	_tmp0_ = (*self).id;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 ((*dest).id);
	(*dest).id = _tmp1_;
	(*dest).width = (*self).width;
	(*dest).height = (*self).height;
	(*dest).frequency = (*self).frequency;
	(*dest).preferred_scale = (*self).preferred_scale;
	_tmp2_ = (*self).supported_scales;
	_tmp2__length1 = (*self).supported_scales_length1;
	_tmp3_ = (_tmp2_ != NULL) ? _vala_array_dup1 (_tmp2_, _tmp2__length1) : _tmp2_;
	_tmp3__length1 = _tmp2__length1;
	(*dest).supported_scales = (g_free ((*dest).supported_scales), NULL);
	(*dest).supported_scales = _tmp3_;
	(*dest).supported_scales_length1 = _tmp3__length1;
	_tmp4_ = (*self).properties;
	_tmp5_ = _g_hash_table_ref0 (_tmp4_);
	_g_hash_table_unref0 ((*dest).properties);
	(*dest).properties = _tmp5_;
}

void
mutter_read_monitor_mode_destroy (MutterReadMonitorMode* self)
{
	_g_free0 ((*self).id);
	(*self).supported_scales = (g_free ((*self).supported_scales), NULL);
	_g_hash_table_unref0 ((*self).properties);
}

MutterReadMonitorMode*
mutter_read_monitor_mode_dup (const MutterReadMonitorMode* self)
{
	MutterReadMonitorMode* dup;
	dup = g_new0 (MutterReadMonitorMode, 1);
	mutter_read_monitor_mode_copy (self, dup);
	return dup;
}

void
mutter_read_monitor_mode_free (MutterReadMonitorMode* self)
{
	mutter_read_monitor_mode_destroy (self);
	g_free (self);
}

 G_GNUC_NO_INLINE static GType
mutter_read_monitor_mode_get_type_once (void)
{
	GType mutter_read_monitor_mode_type_id;
	mutter_read_monitor_mode_type_id = g_boxed_type_register_static ("MutterReadMonitorMode", (GBoxedCopyFunc) mutter_read_monitor_mode_dup, (GBoxedFreeFunc) mutter_read_monitor_mode_free);
	return mutter_read_monitor_mode_type_id;
}

GType
mutter_read_monitor_mode_get_type (void)
{
	static gsize mutter_read_monitor_mode_type_id__once = 0;
	if (g_once_init_enter (&mutter_read_monitor_mode_type_id__once)) {
		GType mutter_read_monitor_mode_type_id;
		mutter_read_monitor_mode_type_id = mutter_read_monitor_mode_get_type_once ();
		g_once_init_leave (&mutter_read_monitor_mode_type_id__once, mutter_read_monitor_mode_type_id);
	}
	return mutter_read_monitor_mode_type_id__once;
}

static void
_vala_MutterReadMonitorMode_array_free (MutterReadMonitorMode * array,
                                        gssize array_length)
{
	if (array != NULL) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			mutter_read_monitor_mode_destroy (&array[i]);
		}
	}
	g_free (array);
}

static MutterReadMonitorMode*
_vala_array_dup2 (MutterReadMonitorMode* self,
                  gssize length)
{
	if (length > 0) {
		MutterReadMonitorMode* result;
		gssize i;
		result = g_new0 (MutterReadMonitorMode, length);
		for (i = 0; i < length; i++) {
			MutterReadMonitorMode _tmp0_;
			MutterReadMonitorMode _tmp1_ = {0};
			_tmp0_ = self[i];
			mutter_read_monitor_mode_copy (&_tmp0_, &_tmp1_);
			result[i] = _tmp1_;
		}
		return result;
	}
	return NULL;
}

void
mutter_read_monitor_copy (const MutterReadMonitor* self,
                          MutterReadMonitor* dest)
{
	MutterReadMonitorInfo _tmp0_;
	MutterReadMonitorInfo _tmp1_;
	MutterReadMonitorInfo _tmp2_ = {0};
	MutterReadMonitorMode* _tmp3_;
	gint _tmp3__length1;
	MutterReadMonitorMode* _tmp4_;
	gint _tmp4__length1;
	GHashTable* _tmp5_;
	GHashTable* _tmp6_;
	_tmp0_ = (*self).monitor;
	_tmp1_ = _tmp0_;
	mutter_read_monitor_info_copy (&_tmp1_, &_tmp2_);
	mutter_read_monitor_info_destroy (&(*dest).monitor);
	(*dest).monitor = _tmp2_;
	_tmp3_ = (*self).modes;
	_tmp3__length1 = (*self).modes_length1;
	_tmp4_ = (_tmp3_ != NULL) ? _vala_array_dup2 (_tmp3_, _tmp3__length1) : _tmp3_;
	_tmp4__length1 = _tmp3__length1;
	(*dest).modes = (_vala_MutterReadMonitorMode_array_free ((*dest).modes, (*dest).modes_length1), NULL);
	(*dest).modes = _tmp4_;
	(*dest).modes_length1 = _tmp4__length1;
	_tmp5_ = (*self).properties;
	_tmp6_ = _g_hash_table_ref0 (_tmp5_);
	_g_hash_table_unref0 ((*dest).properties);
	(*dest).properties = _tmp6_;
}

void
mutter_read_monitor_destroy (MutterReadMonitor* self)
{
	mutter_read_monitor_info_destroy (&(*self).monitor);
	(*self).modes = (_vala_MutterReadMonitorMode_array_free ((*self).modes, (*self).modes_length1), NULL);
	_g_hash_table_unref0 ((*self).properties);
}

MutterReadMonitor*
mutter_read_monitor_dup (const MutterReadMonitor* self)
{
	MutterReadMonitor* dup;
	dup = g_new0 (MutterReadMonitor, 1);
	mutter_read_monitor_copy (self, dup);
	return dup;
}

void
mutter_read_monitor_free (MutterReadMonitor* self)
{
	mutter_read_monitor_destroy (self);
	g_free (self);
}

 G_GNUC_NO_INLINE static GType
mutter_read_monitor_get_type_once (void)
{
	GType mutter_read_monitor_type_id;
	mutter_read_monitor_type_id = g_boxed_type_register_static ("MutterReadMonitor", (GBoxedCopyFunc) mutter_read_monitor_dup, (GBoxedFreeFunc) mutter_read_monitor_free);
	return mutter_read_monitor_type_id;
}

GType
mutter_read_monitor_get_type (void)
{
	static gsize mutter_read_monitor_type_id__once = 0;
	if (g_once_init_enter (&mutter_read_monitor_type_id__once)) {
		GType mutter_read_monitor_type_id;
		mutter_read_monitor_type_id = mutter_read_monitor_get_type_once ();
		g_once_init_leave (&mutter_read_monitor_type_id__once, mutter_read_monitor_type_id);
	}
	return mutter_read_monitor_type_id__once;
}

static void
_vala_MutterReadMonitorInfo_array_free (MutterReadMonitorInfo * array,
                                        gssize array_length)
{
	if (array != NULL) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			mutter_read_monitor_info_destroy (&array[i]);
		}
	}
	g_free (array);
}

static MutterReadMonitorInfo*
_vala_array_dup3 (MutterReadMonitorInfo* self,
                  gssize length)
{
	if (length > 0) {
		MutterReadMonitorInfo* result;
		gssize i;
		result = g_new0 (MutterReadMonitorInfo, length);
		for (i = 0; i < length; i++) {
			MutterReadMonitorInfo _tmp0_;
			MutterReadMonitorInfo _tmp1_ = {0};
			_tmp0_ = self[i];
			mutter_read_monitor_info_copy (&_tmp0_, &_tmp1_);
			result[i] = _tmp1_;
		}
		return result;
	}
	return NULL;
}

void
mutter_read_logical_monitor_copy (const MutterReadLogicalMonitor* self,
                                  MutterReadLogicalMonitor* dest)
{
	MutterReadMonitorInfo* _tmp0_;
	gint _tmp0__length1;
	MutterReadMonitorInfo* _tmp1_;
	gint _tmp1__length1;
	GHashTable* _tmp2_;
	GHashTable* _tmp3_;
	(*dest).x = (*self).x;
	(*dest).y = (*self).y;
	(*dest).scale = (*self).scale;
	(*dest).transform = (*self).transform;
	(*dest).primary = (*self).primary;
	_tmp0_ = (*self).monitors;
	_tmp0__length1 = (*self).monitors_length1;
	_tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup3 (_tmp0_, _tmp0__length1) : _tmp0_;
	_tmp1__length1 = _tmp0__length1;
	(*dest).monitors = (_vala_MutterReadMonitorInfo_array_free ((*dest).monitors, (*dest).monitors_length1), NULL);
	(*dest).monitors = _tmp1_;
	(*dest).monitors_length1 = _tmp1__length1;
	_tmp2_ = (*self).properties;
	_tmp3_ = _g_hash_table_ref0 (_tmp2_);
	_g_hash_table_unref0 ((*dest).properties);
	(*dest).properties = _tmp3_;
}

void
mutter_read_logical_monitor_destroy (MutterReadLogicalMonitor* self)
{
	(*self).monitors = (_vala_MutterReadMonitorInfo_array_free ((*self).monitors, (*self).monitors_length1), NULL);
	_g_hash_table_unref0 ((*self).properties);
}

MutterReadLogicalMonitor*
mutter_read_logical_monitor_dup (const MutterReadLogicalMonitor* self)
{
	MutterReadLogicalMonitor* dup;
	dup = g_new0 (MutterReadLogicalMonitor, 1);
	mutter_read_logical_monitor_copy (self, dup);
	return dup;
}

void
mutter_read_logical_monitor_free (MutterReadLogicalMonitor* self)
{
	mutter_read_logical_monitor_destroy (self);
	g_free (self);
}

 G_GNUC_NO_INLINE static GType
mutter_read_logical_monitor_get_type_once (void)
{
	GType mutter_read_logical_monitor_type_id;
	mutter_read_logical_monitor_type_id = g_boxed_type_register_static ("MutterReadLogicalMonitor", (GBoxedCopyFunc) mutter_read_logical_monitor_dup, (GBoxedFreeFunc) mutter_read_logical_monitor_free);
	return mutter_read_logical_monitor_type_id;
}

GType
mutter_read_logical_monitor_get_type (void)
{
	static gsize mutter_read_logical_monitor_type_id__once = 0;
	if (g_once_init_enter (&mutter_read_logical_monitor_type_id__once)) {
		GType mutter_read_logical_monitor_type_id;
		mutter_read_logical_monitor_type_id = mutter_read_logical_monitor_get_type_once ();
		g_once_init_leave (&mutter_read_logical_monitor_type_id__once, mutter_read_logical_monitor_type_id);
	}
	return mutter_read_logical_monitor_type_id__once;
}

