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

/* vnc-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_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 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_VNC_PREFERENCES_WINDOW (connections_vnc_preferences_window_get_type ())
#define CONNECTIONS_VNC_PREFERENCES_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONNECTIONS_TYPE_VNC_PREFERENCES_WINDOW, ConnectionsVncPreferencesWindow))
#define CONNECTIONS_VNC_PREFERENCES_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONNECTIONS_TYPE_VNC_PREFERENCES_WINDOW, ConnectionsVncPreferencesWindowClass))
#define CONNECTIONS_IS_VNC_PREFERENCES_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONNECTIONS_TYPE_VNC_PREFERENCES_WINDOW))
#define CONNECTIONS_IS_VNC_PREFERENCES_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONNECTIONS_TYPE_VNC_PREFERENCES_WINDOW))
#define CONNECTIONS_VNC_PREFERENCES_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONNECTIONS_TYPE_VNC_PREFERENCES_WINDOW, ConnectionsVncPreferencesWindowClass))

typedef struct _ConnectionsVncPreferencesWindow ConnectionsVncPreferencesWindow;
typedef struct _ConnectionsVncPreferencesWindowClass ConnectionsVncPreferencesWindowClass;
typedef struct _ConnectionsVncPreferencesWindowPrivate ConnectionsVncPreferencesWindowPrivate;

#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_VNC_PREFERENCES_WINDOW_0_PROPERTY,
	CONNECTIONS_VNC_PREFERENCES_WINDOW_NUM_PROPERTIES
};
static GParamSpec* connections_vnc_preferences_window_properties[CONNECTIONS_VNC_PREFERENCES_WINDOW_NUM_PROPERTIES];

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

struct _ConnectionsPreferencesWindowClass {
	HdyPreferencesWindowClass parent_class;
};

struct _ConnectionsVncPreferencesWindow {
	ConnectionsPreferencesWindow parent_instance;
	ConnectionsVncPreferencesWindowPrivate * priv;
};

struct _ConnectionsVncPreferencesWindowClass {
	ConnectionsPreferencesWindowClass parent_class;
};

struct _ConnectionsVncPreferencesWindowPrivate {
	GtkEntry* connection_name_entry;
	GtkLabel* host_address_label;
	ConnectionsBooleanProperty* view_only;
	ConnectionsBooleanProperty* show_local_pointer;
	ConnectionsBooleanProperty* enable_audio;
	GtkComboBoxText* bandwidth_combo;
	GtkComboBoxText* scale_mode_combo;
};

static gint ConnectionsVncPreferencesWindow_private_offset;
static gpointer connections_vnc_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_vnc_preferences_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ConnectionsVncPreferencesWindow, 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 ConnectionsVncPreferencesWindow* connections_vnc_preferences_window_new (ConnectionsConnection* connection);
VALA_EXTERN ConnectionsVncPreferencesWindow* connections_vnc_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_vnc_preferences_window_finalize (GObject * obj);
static GType connections_vnc_preferences_window_get_type_once (void);

static inline gpointer
connections_vnc_preferences_window_get_instance_private (ConnectionsVncPreferencesWindow* self)
{
	return G_STRUCT_MEMBER_P (self, ConnectionsVncPreferencesWindow_private_offset);
}

ConnectionsVncPreferencesWindow*
connections_vnc_preferences_window_construct (GType object_type,
                                              ConnectionsConnection* connection)
{
	ConnectionsVncPreferencesWindow * self = NULL;
	GtkEntry* _tmp0_;
	GtkLabel* _tmp1_;
	GtkComboBoxText* _tmp2_;
	ConnectionsBooleanProperty* _tmp3_;
	ConnectionsBooleanProperty* _tmp4_;
	ConnectionsBooleanProperty* _tmp5_;
	GtkComboBoxText* _tmp6_;
	g_return_val_if_fail (connection != NULL, NULL);
	self = (ConnectionsVncPreferencesWindow*) 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->scale_mode_combo;
	connections_preferences_window_bind_widget_property ((ConnectionsPreferencesWindow*) self, (GtkWidget*) _tmp2_, "active_id", "scale-mode");
	_tmp3_ = self->priv->view_only;
	connections_preferences_window_bind_widget_property ((ConnectionsPreferencesWindow*) self, (GtkWidget*) _tmp3_, "active", "view-only");
	_tmp4_ = self->priv->enable_audio;
	connections_preferences_window_bind_widget_property ((ConnectionsPreferencesWindow*) self, (GtkWidget*) _tmp4_, "active", "enable_audio");
	_tmp5_ = self->priv->show_local_pointer;
	connections_preferences_window_bind_widget_property ((ConnectionsPreferencesWindow*) self, (GtkWidget*) _tmp5_, "active", "show-local-pointer");
	_tmp6_ = self->priv->bandwidth_combo;
	connections_preferences_window_bind_widget_property ((ConnectionsPreferencesWindow*) self, (GtkWidget*) _tmp6_, "active_id", "bandwidth");
	return self;
}

ConnectionsVncPreferencesWindow*
connections_vnc_preferences_window_new (ConnectionsConnection* connection)
{
	return connections_vnc_preferences_window_construct (CONNECTIONS_TYPE_VNC_PREFERENCES_WINDOW, connection);
}

static void
connections_vnc_preferences_window_class_init (ConnectionsVncPreferencesWindowClass * klass,
                                               gpointer klass_data)
{
	connections_vnc_preferences_window_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ConnectionsVncPreferencesWindow_private_offset);
	G_OBJECT_CLASS (klass)->finalize = connections_vnc_preferences_window_finalize;
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/Connections/ui/vnc-preferences.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "connection_name_entry", FALSE, ConnectionsVncPreferencesWindow_private_offset + G_STRUCT_OFFSET (ConnectionsVncPreferencesWindowPrivate, connection_name_entry));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "host_address_label", FALSE, ConnectionsVncPreferencesWindow_private_offset + G_STRUCT_OFFSET (ConnectionsVncPreferencesWindowPrivate, host_address_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "view_only", FALSE, ConnectionsVncPreferencesWindow_private_offset + G_STRUCT_OFFSET (ConnectionsVncPreferencesWindowPrivate, view_only));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "show_local_pointer", FALSE, ConnectionsVncPreferencesWindow_private_offset + G_STRUCT_OFFSET (ConnectionsVncPreferencesWindowPrivate, show_local_pointer));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "enable_audio", FALSE, ConnectionsVncPreferencesWindow_private_offset + G_STRUCT_OFFSET (ConnectionsVncPreferencesWindowPrivate, enable_audio));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "bandwidth_combo", FALSE, ConnectionsVncPreferencesWindow_private_offset + G_STRUCT_OFFSET (ConnectionsVncPreferencesWindowPrivate, bandwidth_combo));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "scale_mode_combo", FALSE, ConnectionsVncPreferencesWindow_private_offset + G_STRUCT_OFFSET (ConnectionsVncPreferencesWindowPrivate, scale_mode_combo));
}

static void
connections_vnc_preferences_window_instance_init (ConnectionsVncPreferencesWindow * self,
                                                  gpointer klass)
{
	self->priv = connections_vnc_preferences_window_get_instance_private (self);
	g_type_ensure (CONNECTIONS_TYPE_BOOLEAN_PROPERTY);
	g_type_ensure (CONNECTIONS_TYPE_BOOLEAN_PROPERTY);
	g_type_ensure (CONNECTIONS_TYPE_BOOLEAN_PROPERTY);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
connections_vnc_preferences_window_finalize (GObject * obj)
{
	ConnectionsVncPreferencesWindow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, CONNECTIONS_TYPE_VNC_PREFERENCES_WINDOW, ConnectionsVncPreferencesWindow);
	G_OBJECT_CLASS (connections_vnc_preferences_window_parent_class)->finalize (obj);
}

static GType
connections_vnc_preferences_window_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ConnectionsVncPreferencesWindowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) connections_vnc_preferences_window_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ConnectionsVncPreferencesWindow), 0, (GInstanceInitFunc) connections_vnc_preferences_window_instance_init, NULL };
	GType connections_vnc_preferences_window_type_id;
	connections_vnc_preferences_window_type_id = g_type_register_static (CONNECTIONS_TYPE_PREFERENCES_WINDOW, "ConnectionsVncPreferencesWindow", &g_define_type_info, 0);
	ConnectionsVncPreferencesWindow_private_offset = g_type_add_instance_private (connections_vnc_preferences_window_type_id, sizeof (ConnectionsVncPreferencesWindowPrivate));
	return connections_vnc_preferences_window_type_id;
}

GType
connections_vnc_preferences_window_get_type (void)
{
	static volatile gsize connections_vnc_preferences_window_type_id__once = 0;
	if (g_once_init_enter (&connections_vnc_preferences_window_type_id__once)) {
		GType connections_vnc_preferences_window_type_id;
		connections_vnc_preferences_window_type_id = connections_vnc_preferences_window_get_type_once ();
		g_once_init_leave (&connections_vnc_preferences_window_type_id__once, connections_vnc_preferences_window_type_id);
	}
	return connections_vnc_preferences_window_type_id__once;
}

