/* rdp-preferences-window.c generated by valac 0.56.3, the Vala compiler
 * generated from rdp-preferences-window.vala, do not modify */

/* rdp-preferences-window.vala
 *
 * Copyright (C) Red Hat, Inc
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Author: Felipe Borges <felipeborges@gnome.org>
 *
 */

#include <handy.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>

#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 CONNECTIONS_TYPE_PREFERENCES_WINDOW (connections_preferences_window_get_type ())
#define CONNECTIONS_PREFERENCES_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONNECTIONS_TYPE_PREFERENCES_WINDOW, ConnectionsPreferencesWindow))
#define CONNECTIONS_PREFERENCES_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONNECTIONS_TYPE_PREFERENCES_WINDOW, ConnectionsPreferencesWindowClass))
#define CONNECTIONS_IS_PREFERENCES_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONNECTIONS_TYPE_PREFERENCES_WINDOW))
#define CONNECTIONS_IS_PREFERENCES_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONNECTIONS_TYPE_PREFERENCES_WINDOW))
#define CONNECTIONS_PREFERENCES_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONNECTIONS_TYPE_PREFERENCES_WINDOW, ConnectionsPreferencesWindowClass))

typedef struct _ConnectionsPreferencesWindow ConnectionsPreferencesWindow;
typedef struct _ConnectionsPreferencesWindowClass ConnectionsPreferencesWindowClass;
typedef struct _ConnectionsPreferencesWindowPrivate ConnectionsPreferencesWindowPrivate;

#define CONNECTIONS_TYPE_CONNECTION (connections_connection_get_type ())
#define CONNECTIONS_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONNECTIONS_TYPE_CONNECTION, ConnectionsConnection))
#define CONNECTIONS_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONNECTIONS_TYPE_CONNECTION, ConnectionsConnectionClass))
#define CONNECTIONS_IS_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONNECTIONS_TYPE_CONNECTION))
#define CONNECTIONS_IS_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONNECTIONS_TYPE_CONNECTION))
#define CONNECTIONS_CONNECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONNECTIONS_TYPE_CONNECTION, ConnectionsConnectionClass))

typedef struct _ConnectionsConnection ConnectionsConnection;
typedef struct _ConnectionsConnectionClass ConnectionsConnectionClass;

#define CONNECTIONS_TYPE_RDP_PREFERENCES_WINDOW (connections_rdp_preferences_window_get_type ())
#define CONNECTIONS_RDP_PREFERENCES_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONNECTIONS_TYPE_RDP_PREFERENCES_WINDOW, ConnectionsRdpPreferencesWindow))
#define CONNECTIONS_RDP_PREFERENCES_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONNECTIONS_TYPE_RDP_PREFERENCES_WINDOW, ConnectionsRdpPreferencesWindowClass))
#define CONNECTIONS_IS_RDP_PREFERENCES_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONNECTIONS_TYPE_RDP_PREFERENCES_WINDOW))
#define CONNECTIONS_IS_RDP_PREFERENCES_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONNECTIONS_TYPE_RDP_PREFERENCES_WINDOW))
#define CONNECTIONS_RDP_PREFERENCES_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONNECTIONS_TYPE_RDP_PREFERENCES_WINDOW, ConnectionsRdpPreferencesWindowClass))

typedef struct _ConnectionsRdpPreferencesWindow ConnectionsRdpPreferencesWindow;
typedef struct _ConnectionsRdpPreferencesWindowClass ConnectionsRdpPreferencesWindowClass;
typedef struct _ConnectionsRdpPreferencesWindowPrivate ConnectionsRdpPreferencesWindowPrivate;

#define CONNECTIONS_TYPE_BOOLEAN_PROPERTY (connections_boolean_property_get_type ())
#define CONNECTIONS_BOOLEAN_PROPERTY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONNECTIONS_TYPE_BOOLEAN_PROPERTY, ConnectionsBooleanProperty))
#define CONNECTIONS_BOOLEAN_PROPERTY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONNECTIONS_TYPE_BOOLEAN_PROPERTY, ConnectionsBooleanPropertyClass))
#define CONNECTIONS_IS_BOOLEAN_PROPERTY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONNECTIONS_TYPE_BOOLEAN_PROPERTY))
#define CONNECTIONS_IS_BOOLEAN_PROPERTY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONNECTIONS_TYPE_BOOLEAN_PROPERTY))
#define CONNECTIONS_BOOLEAN_PROPERTY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONNECTIONS_TYPE_BOOLEAN_PROPERTY, ConnectionsBooleanPropertyClass))

typedef struct _ConnectionsBooleanProperty ConnectionsBooleanProperty;
typedef struct _ConnectionsBooleanPropertyClass ConnectionsBooleanPropertyClass;
enum  {
	CONNECTIONS_RDP_PREFERENCES_WINDOW_0_PROPERTY,
	CONNECTIONS_RDP_PREFERENCES_WINDOW_NUM_PROPERTIES
};
static GParamSpec* connections_rdp_preferences_window_properties[CONNECTIONS_RDP_PREFERENCES_WINDOW_NUM_PROPERTIES];

struct _ConnectionsPreferencesWindow {
	HdyPreferencesWindow parent_instance;
	ConnectionsPreferencesWindowPrivate * priv;
	ConnectionsConnection* connection;
};

struct _ConnectionsPreferencesWindowClass {
	HdyPreferencesWindowClass parent_class;
};

struct _ConnectionsRdpPreferencesWindow {
	ConnectionsPreferencesWindow parent_instance;
	ConnectionsRdpPreferencesWindowPrivate * priv;
};

struct _ConnectionsRdpPreferencesWindowClass {
	ConnectionsPreferencesWindowClass parent_class;
};

struct _ConnectionsRdpPreferencesWindowPrivate {
	GtkEntry* connection_name_entry;
	GtkLabel* host_address_label;
	ConnectionsBooleanProperty* scaling;
};

static gint ConnectionsRdpPreferencesWindow_private_offset;
static gpointer connections_rdp_preferences_window_parent_class = NULL;

VALA_EXTERN GType connections_preferences_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ConnectionsPreferencesWindow, g_object_unref)
VALA_EXTERN GType connections_connection_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ConnectionsConnection, g_object_unref)
VALA_EXTERN GType connections_rdp_preferences_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ConnectionsRdpPreferencesWindow, g_object_unref)
VALA_EXTERN GType connections_boolean_property_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ConnectionsBooleanProperty, g_object_unref)
VALA_EXTERN ConnectionsRdpPreferencesWindow* connections_rdp_preferences_window_new (ConnectionsConnection* connection);
VALA_EXTERN ConnectionsRdpPreferencesWindow* connections_rdp_preferences_window_construct (GType object_type,
                                                                               ConnectionsConnection* connection);
VALA_EXTERN ConnectionsPreferencesWindow* connections_preferences_window_new (void);
VALA_EXTERN ConnectionsPreferencesWindow* connections_preferences_window_construct (GType object_type);
VALA_EXTERN void connections_preferences_window_bind_widget_property (ConnectionsPreferencesWindow* self,
                                                          GtkWidget* widget,
                                                          const gchar* widget_property,
                                                          const gchar* connection_property);
static void connections_rdp_preferences_window_finalize (GObject * obj);
static GType connections_rdp_preferences_window_get_type_once (void);

static inline gpointer
connections_rdp_preferences_window_get_instance_private (ConnectionsRdpPreferencesWindow* self)
{
	return G_STRUCT_MEMBER_P (self, ConnectionsRdpPreferencesWindow_private_offset);
}

ConnectionsRdpPreferencesWindow*
connections_rdp_preferences_window_construct (GType object_type,
                                              ConnectionsConnection* connection)
{
	ConnectionsRdpPreferencesWindow * self = NULL;
	GtkEntry* _tmp0_;
	GtkLabel* _tmp1_;
	ConnectionsBooleanProperty* _tmp2_;
	g_return_val_if_fail (connection != NULL, NULL);
	self = (ConnectionsRdpPreferencesWindow*) connections_preferences_window_construct (object_type);
	((ConnectionsPreferencesWindow*) self)->connection = connection;
	_tmp0_ = self->priv->connection_name_entry;
	connections_preferences_window_bind_widget_property ((ConnectionsPreferencesWindow*) self, (GtkWidget*) _tmp0_, "text", "display_name");
	_tmp1_ = self->priv->host_address_label;
	connections_preferences_window_bind_widget_property ((ConnectionsPreferencesWindow*) self, (GtkWidget*) _tmp1_, "label", "uri");
	_tmp2_ = self->priv->scaling;
	connections_preferences_window_bind_widget_property ((ConnectionsPreferencesWindow*) self, (GtkWidget*) _tmp2_, "active", "scaling");
	return self;
}

ConnectionsRdpPreferencesWindow*
connections_rdp_preferences_window_new (ConnectionsConnection* connection)
{
	return connections_rdp_preferences_window_construct (CONNECTIONS_TYPE_RDP_PREFERENCES_WINDOW, connection);
}

static void
connections_rdp_preferences_window_class_init (ConnectionsRdpPreferencesWindowClass * klass,
                                               gpointer klass_data)
{
	connections_rdp_preferences_window_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ConnectionsRdpPreferencesWindow_private_offset);
	G_OBJECT_CLASS (klass)->finalize = connections_rdp_preferences_window_finalize;
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/Connections/ui/rdp-preferences.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "connection_name_entry", FALSE, ConnectionsRdpPreferencesWindow_private_offset + G_STRUCT_OFFSET (ConnectionsRdpPreferencesWindowPrivate, connection_name_entry));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "host_address_label", FALSE, ConnectionsRdpPreferencesWindow_private_offset + G_STRUCT_OFFSET (ConnectionsRdpPreferencesWindowPrivate, host_address_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "scaling", FALSE, ConnectionsRdpPreferencesWindow_private_offset + G_STRUCT_OFFSET (ConnectionsRdpPreferencesWindowPrivate, scaling));
}

static void
connections_rdp_preferences_window_instance_init (ConnectionsRdpPreferencesWindow * self,
                                                  gpointer klass)
{
	self->priv = connections_rdp_preferences_window_get_instance_private (self);
	g_type_ensure (CONNECTIONS_TYPE_BOOLEAN_PROPERTY);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
connections_rdp_preferences_window_finalize (GObject * obj)
{
	ConnectionsRdpPreferencesWindow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, CONNECTIONS_TYPE_RDP_PREFERENCES_WINDOW, ConnectionsRdpPreferencesWindow);
	G_OBJECT_CLASS (connections_rdp_preferences_window_parent_class)->finalize (obj);
}

static GType
connections_rdp_preferences_window_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ConnectionsRdpPreferencesWindowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) connections_rdp_preferences_window_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ConnectionsRdpPreferencesWindow), 0, (GInstanceInitFunc) connections_rdp_preferences_window_instance_init, NULL };
	GType connections_rdp_preferences_window_type_id;
	connections_rdp_preferences_window_type_id = g_type_register_static (CONNECTIONS_TYPE_PREFERENCES_WINDOW, "ConnectionsRdpPreferencesWindow", &g_define_type_info, 0);
	ConnectionsRdpPreferencesWindow_private_offset = g_type_add_instance_private (connections_rdp_preferences_window_type_id, sizeof (ConnectionsRdpPreferencesWindowPrivate));
	return connections_rdp_preferences_window_type_id;
}

GType
connections_rdp_preferences_window_get_type (void)
{
	static volatile gsize connections_rdp_preferences_window_type_id__once = 0;
	if (g_once_init_enter (&connections_rdp_preferences_window_type_id__once)) {
		GType connections_rdp_preferences_window_type_id;
		connections_rdp_preferences_window_type_id = connections_rdp_preferences_window_get_type_once ();
		g_once_init_leave (&connections_rdp_preferences_window_type_id__once, connections_rdp_preferences_window_type_id);
	}
	return connections_rdp_preferences_window_type_id__once;
}

