/* gitg-commit-submodule-diff-view.c generated by valac 0.34.7, the Vala compiler
 * generated from gitg-commit-submodule-diff-view.vala, do not modify */

/*
 * This file is part of gitg
 *
 * Copyright (C) 2014 - Jesse van den Kieboom
 *
 * gitg 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 2 of the License, or
 * (at your option) any later version.
 *
 * gitg 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 gitg. If not, see <http://www.gnu.org/licenses/>.
 */

#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include "libgitg/libgitg.h"
#include <gio/gio.h>


#define GITG_COMMIT_TYPE_SUBMODULE_DIFF_VIEW (gitg_commit_submodule_diff_view_get_type ())
#define GITG_COMMIT_SUBMODULE_DIFF_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_COMMIT_TYPE_SUBMODULE_DIFF_VIEW, GitgCommitSubmoduleDiffView))
#define GITG_COMMIT_SUBMODULE_DIFF_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_COMMIT_TYPE_SUBMODULE_DIFF_VIEW, GitgCommitSubmoduleDiffViewClass))
#define GITG_COMMIT_IS_SUBMODULE_DIFF_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_COMMIT_TYPE_SUBMODULE_DIFF_VIEW))
#define GITG_COMMIT_IS_SUBMODULE_DIFF_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_COMMIT_TYPE_SUBMODULE_DIFF_VIEW))
#define GITG_COMMIT_SUBMODULE_DIFF_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_COMMIT_TYPE_SUBMODULE_DIFF_VIEW, GitgCommitSubmoduleDiffViewClass))

typedef struct _GitgCommitSubmoduleDiffView GitgCommitSubmoduleDiffView;
typedef struct _GitgCommitSubmoduleDiffViewClass GitgCommitSubmoduleDiffViewClass;
typedef struct _GitgCommitSubmoduleDiffViewPrivate GitgCommitSubmoduleDiffViewPrivate;

#define GITG_COMMIT_TYPE_SUBMODULE_INFO (gitg_commit_submodule_info_get_type ())
#define GITG_COMMIT_SUBMODULE_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_COMMIT_TYPE_SUBMODULE_INFO, GitgCommitSubmoduleInfo))
#define GITG_COMMIT_SUBMODULE_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_COMMIT_TYPE_SUBMODULE_INFO, GitgCommitSubmoduleInfoClass))
#define GITG_COMMIT_IS_SUBMODULE_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_COMMIT_TYPE_SUBMODULE_INFO))
#define GITG_COMMIT_IS_SUBMODULE_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_COMMIT_TYPE_SUBMODULE_INFO))
#define GITG_COMMIT_SUBMODULE_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_COMMIT_TYPE_SUBMODULE_INFO, GitgCommitSubmoduleInfoClass))

typedef struct _GitgCommitSubmoduleInfo GitgCommitSubmoduleInfo;
typedef struct _GitgCommitSubmoduleInfoClass GitgCommitSubmoduleInfoClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _GitgCommitSubmoduleDiffView {
	GtkBox parent_instance;
	GitgCommitSubmoduleDiffViewPrivate * priv;
};

struct _GitgCommitSubmoduleDiffViewClass {
	GtkBoxClass parent_class;
};

struct _GitgCommitSubmoduleDiffViewPrivate {
	GitgCommitSubmoduleInfo* d_info;
	GitgDiffView* d_diff_view_staged;
	GitgDiffView* d_diff_view_unstaged;
	GtkBox* d_box_diffs;
};


static gpointer gitg_commit_submodule_diff_view_parent_class = NULL;

GType gitg_commit_submodule_diff_view_get_type (void) G_GNUC_CONST;
GType gitg_commit_submodule_info_get_type (void) G_GNUC_CONST;
#define GITG_COMMIT_SUBMODULE_DIFF_VIEW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GITG_COMMIT_TYPE_SUBMODULE_DIFF_VIEW, GitgCommitSubmoduleDiffViewPrivate))
enum  {
	GITG_COMMIT_SUBMODULE_DIFF_VIEW_DUMMY_PROPERTY,
	GITG_COMMIT_SUBMODULE_DIFF_VIEW_INFO,
	GITG_COMMIT_SUBMODULE_DIFF_VIEW_DIFF_VIEW_STAGED,
	GITG_COMMIT_SUBMODULE_DIFF_VIEW_DIFF_VIEW_UNSTAGED
};
GitgCommitSubmoduleDiffView* gitg_commit_submodule_diff_view_new (void);
GitgCommitSubmoduleDiffView* gitg_commit_submodule_diff_view_construct (GType object_type);
GitgCommitSubmoduleInfo* gitg_commit_submodule_diff_view_get_info (GitgCommitSubmoduleDiffView* self);
GitgDiffView* gitg_commit_submodule_diff_view_get_diff_view_staged (GitgCommitSubmoduleDiffView* self);
GitgDiffView* gitg_commit_submodule_diff_view_get_diff_view_unstaged (GitgCommitSubmoduleDiffView* self);
static GObject * gitg_commit_submodule_diff_view_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void gitg_commit_submodule_diff_view_finalize (GObject* obj);
static void _vala_gitg_commit_submodule_diff_view_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);


GitgCommitSubmoduleDiffView* gitg_commit_submodule_diff_view_construct (GType object_type) {
	GitgCommitSubmoduleDiffView * self = NULL;
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	self = (GitgCommitSubmoduleDiffView*) g_object_new (object_type, NULL);
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	return self;
#line 97 "gitg-commit-submodule-diff-view.c"
}


GitgCommitSubmoduleDiffView* gitg_commit_submodule_diff_view_new (void) {
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	return gitg_commit_submodule_diff_view_construct (GITG_COMMIT_TYPE_SUBMODULE_DIFF_VIEW);
#line 104 "gitg-commit-submodule-diff-view.c"
}


GitgCommitSubmoduleInfo* gitg_commit_submodule_diff_view_get_info (GitgCommitSubmoduleDiffView* self) {
	GitgCommitSubmoduleInfo* result;
	GitgCommitSubmoduleInfo* _tmp0_ = NULL;
#line 50 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 50 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	_tmp0_ = self->priv->d_info;
#line 50 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	result = _tmp0_;
#line 50 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	return result;
#line 119 "gitg-commit-submodule-diff-view.c"
}


GitgDiffView* gitg_commit_submodule_diff_view_get_diff_view_staged (GitgCommitSubmoduleDiffView* self) {
	GitgDiffView* result;
	GitgDiffView* _tmp0_ = NULL;
#line 55 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 55 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	_tmp0_ = self->priv->d_diff_view_staged;
#line 55 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	result = _tmp0_;
#line 55 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	return result;
#line 134 "gitg-commit-submodule-diff-view.c"
}


GitgDiffView* gitg_commit_submodule_diff_view_get_diff_view_unstaged (GitgCommitSubmoduleDiffView* self) {
	GitgDiffView* result;
	GitgDiffView* _tmp0_ = NULL;
#line 60 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 60 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	_tmp0_ = self->priv->d_diff_view_unstaged;
#line 60 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	result = _tmp0_;
#line 60 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	return result;
#line 149 "gitg-commit-submodule-diff-view.c"
}


static GObject * gitg_commit_submodule_diff_view_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	GitgCommitSubmoduleDiffView * self;
	GSettings* interface_settings = NULL;
	GSettings* _tmp0_ = NULL;
	GSettings* _tmp1_ = NULL;
	GtkBox* _tmp2_ = NULL;
#line 38 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	parent_class = G_OBJECT_CLASS (gitg_commit_submodule_diff_view_parent_class);
#line 38 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
#line 38 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GITG_COMMIT_TYPE_SUBMODULE_DIFF_VIEW, GitgCommitSubmoduleDiffView);
#line 40 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	_tmp0_ = g_settings_new ("org.gnome.gitg.preferences.interface");
#line 40 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	interface_settings = _tmp0_;
#line 42 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	_tmp1_ = interface_settings;
#line 42 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	_tmp2_ = self->priv->d_box_diffs;
#line 42 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	g_settings_bind (_tmp1_, "orientation", (GObject*) _tmp2_, "orientation", G_SETTINGS_BIND_GET);
#line 38 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	_g_object_unref0 (interface_settings);
#line 38 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	return obj;
#line 181 "gitg-commit-submodule-diff-view.c"
}


static void gitg_commit_submodule_diff_view_class_init (GitgCommitSubmoduleDiffViewClass * klass) {
	gint GitgCommitSubmoduleDiffView_private_offset;
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	gitg_commit_submodule_diff_view_parent_class = g_type_class_peek_parent (klass);
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	g_type_class_add_private (klass, sizeof (GitgCommitSubmoduleDiffViewPrivate));
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_gitg_commit_submodule_diff_view_get_property;
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	G_OBJECT_CLASS (klass)->constructor = gitg_commit_submodule_diff_view_constructor;
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	G_OBJECT_CLASS (klass)->finalize = gitg_commit_submodule_diff_view_finalize;
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_COMMIT_SUBMODULE_DIFF_VIEW_INFO, g_param_spec_object ("info", "info", "info", GITG_COMMIT_TYPE_SUBMODULE_INFO, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_COMMIT_SUBMODULE_DIFF_VIEW_DIFF_VIEW_STAGED, g_param_spec_object ("diff-view-staged", "diff-view-staged", "diff-view-staged", GITG_TYPE_DIFF_VIEW, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_COMMIT_SUBMODULE_DIFF_VIEW_DIFF_VIEW_UNSTAGED, g_param_spec_object ("diff-view-unstaged", "diff-view-unstaged", "diff-view-unstaged", GITG_TYPE_DIFF_VIEW, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	GitgCommitSubmoduleDiffView_private_offset = g_type_class_get_instance_private_offset (klass);
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/gitg/ui/gitg-commit-submodule-diff-view.ui");
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "info", FALSE, GitgCommitSubmoduleDiffView_private_offset + G_STRUCT_OFFSET (GitgCommitSubmoduleDiffViewPrivate, d_info));
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "diff_view_staged", FALSE, GitgCommitSubmoduleDiffView_private_offset + G_STRUCT_OFFSET (GitgCommitSubmoduleDiffViewPrivate, d_diff_view_staged));
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "diff_view_unstaged", FALSE, GitgCommitSubmoduleDiffView_private_offset + G_STRUCT_OFFSET (GitgCommitSubmoduleDiffViewPrivate, d_diff_view_unstaged));
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "box_diffs", FALSE, GitgCommitSubmoduleDiffView_private_offset + G_STRUCT_OFFSET (GitgCommitSubmoduleDiffViewPrivate, d_box_diffs));
#line 215 "gitg-commit-submodule-diff-view.c"
}


static void gitg_commit_submodule_diff_view_instance_init (GitgCommitSubmoduleDiffView * self) {
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	self->priv = GITG_COMMIT_SUBMODULE_DIFF_VIEW_GET_PRIVATE (self);
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	g_type_ensure (GITG_COMMIT_TYPE_SUBMODULE_INFO);
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	gtk_widget_init_template (GTK_WIDGET (self));
#line 226 "gitg-commit-submodule-diff-view.c"
}


static void gitg_commit_submodule_diff_view_finalize (GObject* obj) {
	GitgCommitSubmoduleDiffView * self;
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GITG_COMMIT_TYPE_SUBMODULE_DIFF_VIEW, GitgCommitSubmoduleDiffView);
#line 27 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	_g_object_unref0 (self->priv->d_info);
#line 30 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	_g_object_unref0 (self->priv->d_diff_view_staged);
#line 33 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	_g_object_unref0 (self->priv->d_diff_view_unstaged);
#line 36 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	_g_object_unref0 (self->priv->d_box_diffs);
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	G_OBJECT_CLASS (gitg_commit_submodule_diff_view_parent_class)->finalize (obj);
#line 244 "gitg-commit-submodule-diff-view.c"
}


GType gitg_commit_submodule_diff_view_get_type (void) {
	static volatile gsize gitg_commit_submodule_diff_view_type_id__volatile = 0;
	if (g_once_init_enter (&gitg_commit_submodule_diff_view_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GitgCommitSubmoduleDiffViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gitg_commit_submodule_diff_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GitgCommitSubmoduleDiffView), 0, (GInstanceInitFunc) gitg_commit_submodule_diff_view_instance_init, NULL };
		GType gitg_commit_submodule_diff_view_type_id;
		gitg_commit_submodule_diff_view_type_id = g_type_register_static (gtk_box_get_type (), "GitgCommitSubmoduleDiffView", &g_define_type_info, 0);
		g_once_init_leave (&gitg_commit_submodule_diff_view_type_id__volatile, gitg_commit_submodule_diff_view_type_id);
	}
	return gitg_commit_submodule_diff_view_type_id__volatile;
}


static void _vala_gitg_commit_submodule_diff_view_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	GitgCommitSubmoduleDiffView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GITG_COMMIT_TYPE_SUBMODULE_DIFF_VIEW, GitgCommitSubmoduleDiffView);
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
	switch (property_id) {
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
		case GITG_COMMIT_SUBMODULE_DIFF_VIEW_INFO:
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
		g_value_set_object (value, gitg_commit_submodule_diff_view_get_info (self));
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
		break;
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
		case GITG_COMMIT_SUBMODULE_DIFF_VIEW_DIFF_VIEW_STAGED:
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
		g_value_set_object (value, gitg_commit_submodule_diff_view_get_diff_view_staged (self));
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
		break;
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
		case GITG_COMMIT_SUBMODULE_DIFF_VIEW_DIFF_VIEW_UNSTAGED:
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
		g_value_set_object (value, gitg_commit_submodule_diff_view_get_diff_view_unstaged (self));
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
		break;
#line 283 "gitg-commit-submodule-diff-view.c"
		default:
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 24 "/home/jesse/dev/gitg/gitg/commit/gitg-commit-submodule-diff-view.vala"
		break;
#line 289 "gitg-commit-submodule-diff-view.c"
	}
}



