/* gcp-diagnostic-tags.c generated by valac 0.19.0, the Vala compiler
 * generated from gcp-diagnostic-tags.vala, do not modify */

/*
 * This file is part of gedit-code-assistant.
 *
 * Copyright (C) 2011 - Jesse van den Kieboom
 *
 * gedit-code-assistant 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.
 *
 * gedit-code-assistant 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 gedit-code-assistant.  If not, see <http://www.gnu.org/licenses/>.
 */

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


#define GCP_TYPE_DIAGNOSTIC_TAGS (gcp_diagnostic_tags_get_type ())
#define GCP_DIAGNOSTIC_TAGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCP_TYPE_DIAGNOSTIC_TAGS, GcpDiagnosticTags))
#define GCP_DIAGNOSTIC_TAGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GCP_TYPE_DIAGNOSTIC_TAGS, GcpDiagnosticTagsClass))
#define GCP_IS_DIAGNOSTIC_TAGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GCP_TYPE_DIAGNOSTIC_TAGS))
#define GCP_IS_DIAGNOSTIC_TAGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GCP_TYPE_DIAGNOSTIC_TAGS))
#define GCP_DIAGNOSTIC_TAGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GCP_TYPE_DIAGNOSTIC_TAGS, GcpDiagnosticTagsClass))

typedef struct _GcpDiagnosticTags GcpDiagnosticTags;
typedef struct _GcpDiagnosticTagsClass GcpDiagnosticTagsClass;
typedef struct _GcpDiagnosticTagsPrivate GcpDiagnosticTagsPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define GCP_TYPE_DIAGNOSTIC_COLORS (gcp_diagnostic_colors_get_type ())
#define GCP_DIAGNOSTIC_COLORS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCP_TYPE_DIAGNOSTIC_COLORS, GcpDiagnosticColors))
#define GCP_DIAGNOSTIC_COLORS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GCP_TYPE_DIAGNOSTIC_COLORS, GcpDiagnosticColorsClass))
#define GCP_IS_DIAGNOSTIC_COLORS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GCP_TYPE_DIAGNOSTIC_COLORS))
#define GCP_IS_DIAGNOSTIC_COLORS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GCP_TYPE_DIAGNOSTIC_COLORS))
#define GCP_DIAGNOSTIC_COLORS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GCP_TYPE_DIAGNOSTIC_COLORS, GcpDiagnosticColorsClass))

typedef struct _GcpDiagnosticColors GcpDiagnosticColors;
typedef struct _GcpDiagnosticColorsClass GcpDiagnosticColorsClass;
#define _gcp_diagnostic_colors_unref0(var) ((var == NULL) ? NULL : (var = (gcp_diagnostic_colors_unref (var), NULL)))

#define GCP_DIAGNOSTIC_TYPE_SEVERITY (gcp_diagnostic_severity_get_type ())

struct _GcpDiagnosticTags {
	GObject parent_instance;
	GcpDiagnosticTagsPrivate * priv;
};

struct _GcpDiagnosticTagsClass {
	GObjectClass parent_class;
};

typedef enum  {
	GCP_DIAGNOSTIC_SEVERITY_NONE,
	GCP_DIAGNOSTIC_SEVERITY_INFO,
	GCP_DIAGNOSTIC_SEVERITY_WARNING,
	GCP_DIAGNOSTIC_SEVERITY_ERROR,
	GCP_DIAGNOSTIC_SEVERITY_FATAL,
	GCP_DIAGNOSTIC_SEVERITY_NUM
} GcpDiagnosticSeverity;


extern GtkTextView* gcp_d_view;
GtkTextView* gcp_d_view = NULL;
extern GtkTextBuffer* gcp_d_buffer;
GtkTextBuffer* gcp_d_buffer = NULL;
extern GtkTextTag* gcp_d_infoTag;
GtkTextTag* gcp_d_infoTag = NULL;
extern GtkTextTag* gcp_d_warningTag;
GtkTextTag* gcp_d_warningTag = NULL;
extern GtkTextTag* gcp_d_errorTag;
GtkTextTag* gcp_d_errorTag = NULL;
extern GtkTextTag* gcp_d_locationTag;
GtkTextTag* gcp_d_locationTag = NULL;
extern GtkTextTag* gcp_d_fixitTag;
GtkTextTag* gcp_d_fixitTag = NULL;
static gpointer gcp_diagnostic_tags_parent_class = NULL;

GType gcp_diagnostic_tags_get_type (void) G_GNUC_CONST;
enum  {
	GCP_DIAGNOSTIC_TAGS_DUMMY_PROPERTY,
	GCP_DIAGNOSTIC_TAGS_ERROR_TAG,
	GCP_DIAGNOSTIC_TAGS_WARNING_TAG,
	GCP_DIAGNOSTIC_TAGS_INFO_TAG,
	GCP_DIAGNOSTIC_TAGS_LOCATION_TAG,
	GCP_DIAGNOSTIC_TAGS_FIXIT_TAG
};
static void gcp_diagnostic_tags_remove_tags (GcpDiagnosticTags* self);
static void gcp_diagnostic_tags_on_style_updated (GcpDiagnosticTags* self);
static void _gcp_diagnostic_tags_on_style_updated_gtk_widget_style_updated (GtkWidget* _sender, gpointer self);
GcpDiagnosticTags* gcp_diagnostic_tags_new (GtkTextView* view);
GcpDiagnosticTags* gcp_diagnostic_tags_construct (GType object_type, GtkTextView* view);
static void gcp_diagnostic_tags_on_buffer_changed (GcpDiagnosticTags* self);
static void _gcp_diagnostic_tags_on_buffer_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void gcp_diagnostic_tags_update_tags (GcpDiagnosticTags* self);
static GtkTextTag* gcp_diagnostic_tags_ensure_tag (GcpDiagnosticTags* self, GtkTextTag** tag, const gchar* name);
static void gcp_diagnostic_tags_update_tag (GcpDiagnosticTags* self, GtkTextTag** tag, const gchar* name, GdkRGBA* col);
gpointer gcp_diagnostic_colors_ref (gpointer instance);
void gcp_diagnostic_colors_unref (gpointer instance);
GParamSpec* gcp_param_spec_diagnostic_colors (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void gcp_value_set_diagnostic_colors (GValue* value, gpointer v_object);
void gcp_value_take_diagnostic_colors (GValue* value, gpointer v_object);
gpointer gcp_value_get_diagnostic_colors (const GValue* value);
GType gcp_diagnostic_colors_get_type (void) G_GNUC_CONST;
GcpDiagnosticColors* gcp_diagnostic_colors_new (GtkStyleContext* context);
GcpDiagnosticColors* gcp_diagnostic_colors_construct (GType object_type, GtkStyleContext* context);
void gcp_diagnostic_colors_mix_in_widget (GcpDiagnosticColors* self, GtkWidget* widget);
void gcp_diagnostic_colors_get_info_color (GcpDiagnosticColors* self, GdkRGBA* result);
void gcp_diagnostic_colors_get_warning_color (GcpDiagnosticColors* self, GdkRGBA* result);
void gcp_diagnostic_colors_get_error_color (GcpDiagnosticColors* self, GdkRGBA* result);
GType gcp_diagnostic_severity_get_type (void) G_GNUC_CONST;
GtkTextTag* gcp_diagnostic_tags_get (GcpDiagnosticTags* self, GcpDiagnosticSeverity severity);
static void gcp_diagnostic_tags_remove_tag (GcpDiagnosticTags* self, GtkTextTag** tag);
GtkTextTag* gcp_diagnostic_tags_get_error_tag (GcpDiagnosticTags* self);
GtkTextTag* gcp_diagnostic_tags_get_warning_tag (GcpDiagnosticTags* self);
GtkTextTag* gcp_diagnostic_tags_get_info_tag (GcpDiagnosticTags* self);
GtkTextTag* gcp_diagnostic_tags_get_location_tag (GcpDiagnosticTags* self);
GtkTextTag* gcp_diagnostic_tags_get_fixit_tag (GcpDiagnosticTags* self);
static void gcp_diagnostic_tags_finalize (GObject* obj);
static void _vala_gcp_diagnostic_tags_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);


static void _gcp_diagnostic_tags_on_style_updated_gtk_widget_style_updated (GtkWidget* _sender, gpointer self) {
	gcp_diagnostic_tags_on_style_updated (self);
}


static void _gcp_diagnostic_tags_on_buffer_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	gcp_diagnostic_tags_on_buffer_changed (self);
}


GcpDiagnosticTags* gcp_diagnostic_tags_construct (GType object_type, GtkTextView* view) {
	GcpDiagnosticTags * self = NULL;
	GtkTextView* _tmp0_;
	GtkTextView* _tmp1_;
	GtkTextView* _tmp2_;
	GtkTextView* _tmp3_;
	GtkTextBuffer* _tmp4_;
	GtkTextBuffer* _tmp5_;
	g_return_val_if_fail (view != NULL, NULL);
	self = (GcpDiagnosticTags*) g_object_new (object_type, NULL);
	_tmp0_ = view;
	gcp_d_view = _tmp0_;
	_tmp1_ = gcp_d_view;
	g_signal_connect_object ((GtkWidget*) _tmp1_, "style-updated", (GCallback) _gcp_diagnostic_tags_on_style_updated_gtk_widget_style_updated, self, 0);
	_tmp2_ = gcp_d_view;
	g_signal_connect_object ((GObject*) _tmp2_, "notify::buffer", (GCallback) _gcp_diagnostic_tags_on_buffer_changed_g_object_notify, self, 0);
	_tmp3_ = view;
	_tmp4_ = gtk_text_view_get_buffer (_tmp3_);
	_tmp5_ = _tmp4_;
	gcp_d_buffer = _tmp5_;
	gcp_diagnostic_tags_update_tags (self);
	return self;
}


GcpDiagnosticTags* gcp_diagnostic_tags_new (GtkTextView* view) {
	return gcp_diagnostic_tags_construct (GCP_TYPE_DIAGNOSTIC_TAGS, view);
}


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


static GtkTextTag* gcp_diagnostic_tags_ensure_tag (GcpDiagnosticTags* self, GtkTextTag** tag, const gchar* name) {
	GtkTextTag* result = NULL;
	GtkTextTag* _tmp0_;
	GtkTextTag* _tmp5_;
	GtkTextTag* _tmp6_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (name != NULL, NULL);
	_tmp0_ = *tag;
	if (_tmp0_ == NULL) {
		GtkTextBuffer* _tmp1_;
		const gchar* _tmp2_;
		GtkTextTag* _tmp3_ = NULL;
		GtkTextTag* _tmp4_;
		_tmp1_ = gcp_d_buffer;
		_tmp2_ = name;
		_tmp3_ = gtk_text_buffer_create_tag (_tmp1_, _tmp2_, NULL);
		_tmp4_ = _g_object_ref0 (_tmp3_);
		_g_object_unref0 (*tag);
		*tag = _tmp4_;
	}
	_tmp5_ = *tag;
	_tmp6_ = _g_object_ref0 (_tmp5_);
	result = _tmp6_;
	return result;
}


static void gcp_diagnostic_tags_update_tag (GcpDiagnosticTags* self, GtkTextTag** tag, const gchar* name, GdkRGBA* col) {
	GdkRGBA _tmp0_;
	gdouble _tmp1_;
	GdkRGBA _tmp2_;
	gdouble _tmp3_;
	GdkRGBA _tmp4_;
	gdouble _tmp5_;
	GdkColor _tmp6_ = {0};
	GdkColor bgcol;
	const gchar* _tmp7_;
	GtkTextTag* _tmp8_ = NULL;
	GtkTextTag* _tmp9_;
	GtkTextTag* _tmp10_;
	GdkColor _tmp11_;
	GtkTextTag* _tmp12_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (name != NULL);
	g_return_if_fail (col != NULL);
	_tmp0_ = *col;
	_tmp1_ = _tmp0_.red;
	_tmp2_ = *col;
	_tmp3_ = _tmp2_.green;
	_tmp4_ = *col;
	_tmp5_ = _tmp4_.blue;
	memset (&_tmp6_, 0, sizeof (GdkColor));
	_tmp6_.red = (guint16) ((gushort) (_tmp1_ * 65535));
	_tmp6_.green = (guint16) ((gushort) (_tmp3_ * 65535));
	_tmp6_.blue = (guint16) ((gushort) (_tmp5_ * 65535));
	bgcol = _tmp6_;
	_tmp7_ = name;
	_tmp8_ = gcp_diagnostic_tags_ensure_tag (self, tag, _tmp7_);
	_tmp9_ = _tmp8_;
	_g_object_unref0 (_tmp9_);
	_tmp10_ = *tag;
	_tmp11_ = bgcol;
	g_object_set (_tmp10_, "background-gdk", &_tmp11_, NULL);
	_tmp12_ = *tag;
	g_object_set (_tmp12_, "background-full-height", TRUE, NULL);
}


static void gcp_diagnostic_tags_update_tags (GcpDiagnosticTags* self) {
	GcpDiagnosticColors* colors = NULL;
	GtkTextView* _tmp0_;
	GtkStyleContext* _tmp1_ = NULL;
	GcpDiagnosticColors* _tmp2_;
	GtkTextView* _tmp3_;
	GdkRGBA _tmp4_;
	GdkRGBA _tmp5_;
	GdkRGBA _tmp6_;
	GdkRGBA _tmp7_;
	GdkRGBA _tmp8_;
	GdkRGBA _tmp9_;
	GtkTextTag* _tmp10_ = NULL;
	GtkTextTag* _tmp11_;
	GtkTextTag* _tmp12_;
	GtkTextTag* _tmp13_ = NULL;
	GtkTextTag* _tmp14_;
	GtkTextTag* _tmp15_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gcp_d_view;
	_tmp1_ = gtk_widget_get_style_context ((GtkWidget*) _tmp0_);
	_tmp2_ = gcp_diagnostic_colors_new (_tmp1_);
	_gcp_diagnostic_colors_unref0 (colors);
	colors = _tmp2_;
	_tmp3_ = gcp_d_view;
	gcp_diagnostic_colors_mix_in_widget (colors, (GtkWidget*) _tmp3_);
	gcp_diagnostic_colors_get_info_color (colors, &_tmp4_);
	_tmp5_ = _tmp4_;
	gcp_diagnostic_tags_update_tag (self, &gcp_d_infoTag, "Gcp.Info", &_tmp5_);
	gcp_diagnostic_colors_get_warning_color (colors, &_tmp6_);
	_tmp7_ = _tmp6_;
	gcp_diagnostic_tags_update_tag (self, &gcp_d_warningTag, "Gcp.Warning", &_tmp7_);
	gcp_diagnostic_colors_get_error_color (colors, &_tmp8_);
	_tmp9_ = _tmp8_;
	gcp_diagnostic_tags_update_tag (self, &gcp_d_errorTag, "Gcp.Error", &_tmp9_);
	_tmp10_ = gcp_diagnostic_tags_ensure_tag (self, &gcp_d_locationTag, "Gcp.Location");
	_tmp11_ = _tmp10_;
	_g_object_unref0 (_tmp11_);
	_tmp12_ = gcp_d_locationTag;
	g_object_set (_tmp12_, "weight", (gint) PANGO_WEIGHT_BOLD, NULL);
	_tmp13_ = gcp_diagnostic_tags_ensure_tag (self, &gcp_d_fixitTag, "Gcp.Fixit");
	_tmp14_ = _tmp13_;
	_g_object_unref0 (_tmp14_);
	_tmp15_ = gcp_d_fixitTag;
	g_object_set (_tmp15_, "strikethrough", TRUE, NULL);
	_gcp_diagnostic_colors_unref0 (colors);
}


GtkTextTag* gcp_diagnostic_tags_get (GcpDiagnosticTags* self, GcpDiagnosticSeverity severity) {
	GtkTextTag* result = NULL;
	GcpDiagnosticSeverity _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = severity;
	switch (_tmp0_) {
		case GCP_DIAGNOSTIC_SEVERITY_INFO:
		{
			GtkTextTag* _tmp1_;
			GtkTextTag* _tmp2_;
			_tmp1_ = gcp_d_infoTag;
			_tmp2_ = _g_object_ref0 (_tmp1_);
			result = _tmp2_;
			return result;
		}
		case GCP_DIAGNOSTIC_SEVERITY_WARNING:
		{
			GtkTextTag* _tmp3_;
			GtkTextTag* _tmp4_;
			_tmp3_ = gcp_d_warningTag;
			_tmp4_ = _g_object_ref0 (_tmp3_);
			result = _tmp4_;
			return result;
		}
		case GCP_DIAGNOSTIC_SEVERITY_ERROR:
		case GCP_DIAGNOSTIC_SEVERITY_FATAL:
		{
			GtkTextTag* _tmp5_;
			GtkTextTag* _tmp6_;
			_tmp5_ = gcp_d_errorTag;
			_tmp6_ = _g_object_ref0 (_tmp5_);
			result = _tmp6_;
			return result;
		}
		default:
		{
			result = NULL;
			return result;
		}
	}
}


static void gcp_diagnostic_tags_remove_tag (GcpDiagnosticTags* self, GtkTextTag** tag) {
	gboolean _tmp0_ = FALSE;
	GtkTextBuffer* _tmp1_;
	gboolean _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp1_ = gcp_d_buffer;
	if (_tmp1_ != NULL) {
		GtkTextTag* _tmp2_;
		_tmp2_ = *tag;
		_tmp0_ = _tmp2_ != NULL;
	} else {
		_tmp0_ = FALSE;
	}
	_tmp3_ = _tmp0_;
	if (_tmp3_) {
		GtkTextBuffer* _tmp4_;
		GtkTextTagTable* _tmp5_;
		GtkTextTagTable* _tmp6_;
		GtkTextTag* _tmp7_;
		_tmp4_ = gcp_d_buffer;
		_tmp5_ = gtk_text_buffer_get_tag_table (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = *tag;
		gtk_text_tag_table_remove (_tmp6_, _tmp7_);
		_g_object_unref0 (*tag);
		*tag = NULL;
	}
}


static void gcp_diagnostic_tags_remove_tags (GcpDiagnosticTags* self) {
	g_return_if_fail (self != NULL);
	gcp_diagnostic_tags_remove_tag (self, &gcp_d_errorTag);
	gcp_diagnostic_tags_remove_tag (self, &gcp_d_warningTag);
	gcp_diagnostic_tags_remove_tag (self, &gcp_d_infoTag);
	gcp_diagnostic_tags_remove_tag (self, &gcp_d_locationTag);
	gcp_diagnostic_tags_remove_tag (self, &gcp_d_fixitTag);
}


static void gcp_diagnostic_tags_on_buffer_changed (GcpDiagnosticTags* self) {
	GtkTextView* _tmp0_;
	GtkTextBuffer* _tmp1_;
	GtkTextBuffer* _tmp2_;
	g_return_if_fail (self != NULL);
	gcp_diagnostic_tags_remove_tags (self);
	_tmp0_ = gcp_d_view;
	_tmp1_ = gtk_text_view_get_buffer (_tmp0_);
	_tmp2_ = _tmp1_;
	gcp_d_buffer = _tmp2_;
	_g_object_unref0 (gcp_d_errorTag);
	gcp_d_errorTag = NULL;
	_g_object_unref0 (gcp_d_warningTag);
	gcp_d_warningTag = NULL;
	_g_object_unref0 (gcp_d_infoTag);
	gcp_d_infoTag = NULL;
	gcp_diagnostic_tags_update_tags (self);
}


static void gcp_diagnostic_tags_on_style_updated (GcpDiagnosticTags* self) {
	g_return_if_fail (self != NULL);
	gcp_diagnostic_tags_update_tags (self);
}


GtkTextTag* gcp_diagnostic_tags_get_error_tag (GcpDiagnosticTags* self) {
	GtkTextTag* result;
	GtkTextTag* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = gcp_d_errorTag;
	result = _tmp0_;
	return result;
}


GtkTextTag* gcp_diagnostic_tags_get_warning_tag (GcpDiagnosticTags* self) {
	GtkTextTag* result;
	GtkTextTag* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = gcp_d_warningTag;
	result = _tmp0_;
	return result;
}


GtkTextTag* gcp_diagnostic_tags_get_info_tag (GcpDiagnosticTags* self) {
	GtkTextTag* result;
	GtkTextTag* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = gcp_d_infoTag;
	result = _tmp0_;
	return result;
}


GtkTextTag* gcp_diagnostic_tags_get_location_tag (GcpDiagnosticTags* self) {
	GtkTextTag* result;
	GtkTextTag* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = gcp_d_locationTag;
	result = _tmp0_;
	return result;
}


GtkTextTag* gcp_diagnostic_tags_get_fixit_tag (GcpDiagnosticTags* self) {
	GtkTextTag* result;
	GtkTextTag* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = gcp_d_fixitTag;
	result = _tmp0_;
	return result;
}


static void gcp_diagnostic_tags_class_init (GcpDiagnosticTagsClass * klass) {
	gcp_diagnostic_tags_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->get_property = _vala_gcp_diagnostic_tags_get_property;
	G_OBJECT_CLASS (klass)->finalize = gcp_diagnostic_tags_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GCP_DIAGNOSTIC_TAGS_ERROR_TAG, g_param_spec_object ("error-tag", "error-tag", "error-tag", GTK_TYPE_TEXT_TAG, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GCP_DIAGNOSTIC_TAGS_WARNING_TAG, g_param_spec_object ("warning-tag", "warning-tag", "warning-tag", GTK_TYPE_TEXT_TAG, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GCP_DIAGNOSTIC_TAGS_INFO_TAG, g_param_spec_object ("info-tag", "info-tag", "info-tag", GTK_TYPE_TEXT_TAG, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GCP_DIAGNOSTIC_TAGS_LOCATION_TAG, g_param_spec_object ("location-tag", "location-tag", "location-tag", GTK_TYPE_TEXT_TAG, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GCP_DIAGNOSTIC_TAGS_FIXIT_TAG, g_param_spec_object ("fixit-tag", "fixit-tag", "fixit-tag", GTK_TYPE_TEXT_TAG, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
}


static void gcp_diagnostic_tags_instance_init (GcpDiagnosticTags * self) {
}


static void gcp_diagnostic_tags_finalize (GObject* obj) {
	GcpDiagnosticTags * self;
	GtkTextView* _tmp0_;
	guint _tmp1_ = 0U;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GCP_TYPE_DIAGNOSTIC_TAGS, GcpDiagnosticTags);
	gcp_diagnostic_tags_remove_tags (self);
	_tmp0_ = gcp_d_view;
	g_signal_parse_name ("style-updated", GTK_TYPE_WIDGET, &_tmp1_, NULL, FALSE);
	g_signal_handlers_disconnect_matched ((GtkWidget*) _tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _gcp_diagnostic_tags_on_style_updated_gtk_widget_style_updated, self);
	G_OBJECT_CLASS (gcp_diagnostic_tags_parent_class)->finalize (obj);
}


GType gcp_diagnostic_tags_get_type (void) {
	static volatile gsize gcp_diagnostic_tags_type_id__volatile = 0;
	if (g_once_init_enter (&gcp_diagnostic_tags_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GcpDiagnosticTagsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gcp_diagnostic_tags_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GcpDiagnosticTags), 0, (GInstanceInitFunc) gcp_diagnostic_tags_instance_init, NULL };
		GType gcp_diagnostic_tags_type_id;
		gcp_diagnostic_tags_type_id = g_type_register_static (G_TYPE_OBJECT, "GcpDiagnosticTags", &g_define_type_info, 0);
		g_once_init_leave (&gcp_diagnostic_tags_type_id__volatile, gcp_diagnostic_tags_type_id);
	}
	return gcp_diagnostic_tags_type_id__volatile;
}


static void _vala_gcp_diagnostic_tags_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	GcpDiagnosticTags * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GCP_TYPE_DIAGNOSTIC_TAGS, GcpDiagnosticTags);
	switch (property_id) {
		case GCP_DIAGNOSTIC_TAGS_ERROR_TAG:
		g_value_set_object (value, gcp_diagnostic_tags_get_error_tag (self));
		break;
		case GCP_DIAGNOSTIC_TAGS_WARNING_TAG:
		g_value_set_object (value, gcp_diagnostic_tags_get_warning_tag (self));
		break;
		case GCP_DIAGNOSTIC_TAGS_INFO_TAG:
		g_value_set_object (value, gcp_diagnostic_tags_get_info_tag (self));
		break;
		case GCP_DIAGNOSTIC_TAGS_LOCATION_TAG:
		g_value_set_object (value, gcp_diagnostic_tags_get_location_tag (self));
		break;
		case GCP_DIAGNOSTIC_TAGS_FIXIT_TAG:
		g_value_set_object (value, gcp_diagnostic_tags_get_fixit_tag (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}



