/* gcp-semantic-value-support.c generated by valac 0.19.0, the Vala compiler
 * generated from gcp-semantic-value-support.vala, do not modify */


#include <glib.h>
#include <glib-object.h>


#define GCP_TYPE_SOURCE_INDEX (gcp_source_index_get_type ())
#define GCP_SOURCE_INDEX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCP_TYPE_SOURCE_INDEX, GcpSourceIndex))
#define GCP_SOURCE_INDEX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GCP_TYPE_SOURCE_INDEX, GcpSourceIndexClass))
#define GCP_IS_SOURCE_INDEX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GCP_TYPE_SOURCE_INDEX))
#define GCP_IS_SOURCE_INDEX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GCP_TYPE_SOURCE_INDEX))
#define GCP_SOURCE_INDEX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GCP_TYPE_SOURCE_INDEX, GcpSourceIndexClass))

typedef struct _GcpSourceIndex GcpSourceIndex;
typedef struct _GcpSourceIndexClass GcpSourceIndexClass;

#define GCP_TYPE_DOCUMENT (gcp_document_get_type ())
#define GCP_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCP_TYPE_DOCUMENT, GcpDocument))
#define GCP_DOCUMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GCP_TYPE_DOCUMENT, GcpDocumentClass))
#define GCP_IS_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GCP_TYPE_DOCUMENT))
#define GCP_IS_DOCUMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GCP_TYPE_DOCUMENT))
#define GCP_DOCUMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GCP_TYPE_DOCUMENT, GcpDocumentClass))

typedef struct _GcpDocument GcpDocument;
typedef struct _GcpDocumentClass GcpDocumentClass;

#define GCP_TYPE_SEMANTIC_VALUE_SUPPORT (gcp_semantic_value_support_get_type ())
#define GCP_SEMANTIC_VALUE_SUPPORT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCP_TYPE_SEMANTIC_VALUE_SUPPORT, GcpSemanticValueSupport))
#define GCP_IS_SEMANTIC_VALUE_SUPPORT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GCP_TYPE_SEMANTIC_VALUE_SUPPORT))
#define GCP_SEMANTIC_VALUE_SUPPORT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GCP_TYPE_SEMANTIC_VALUE_SUPPORT, GcpSemanticValueSupportIface))

typedef struct _GcpSemanticValueSupport GcpSemanticValueSupport;
typedef struct _GcpSemanticValueSupportIface GcpSemanticValueSupportIface;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

typedef void (*GcpWithSemanticValueCallback) (GcpSourceIndex* diagnostics, void* user_data);
struct _GcpSemanticValueSupportIface {
	GTypeInterface parent_iface;
	GcpSourceIndex* (*begin_semantics) (GcpSemanticValueSupport* self);
	void (*end_semantics) (GcpSemanticValueSupport* self);
};



GType gcp_source_index_get_type (void) G_GNUC_CONST;
GType gcp_document_get_type (void) G_GNUC_CONST;
GType gcp_semantic_value_support_get_type (void) G_GNUC_CONST;
void gcp_semantic_value_support_with_semantics (GcpSemanticValueSupport* self, GcpWithSemanticValueCallback callback, void* callback_target);
GcpSourceIndex* gcp_semantic_value_support_begin_semantics (GcpSemanticValueSupport* self);
void gcp_semantic_value_support_end_semantics (GcpSemanticValueSupport* self);


void gcp_semantic_value_support_with_semantics (GcpSemanticValueSupport* self, GcpWithSemanticValueCallback callback, void* callback_target) {
	GcpSourceIndex* _tmp0_ = NULL;
	GcpSourceIndex* sems;
	GcpWithSemanticValueCallback _tmp1_;
	void* _tmp1__target;
	_tmp0_ = gcp_semantic_value_support_begin_semantics (self);
	sems = _tmp0_;
	_tmp1_ = callback;
	_tmp1__target = callback_target;
	_tmp1_ (sems, _tmp1__target);
	gcp_semantic_value_support_end_semantics (self);
	_g_object_unref0 (sems);
}


GcpSourceIndex* gcp_semantic_value_support_begin_semantics (GcpSemanticValueSupport* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return GCP_SEMANTIC_VALUE_SUPPORT_GET_INTERFACE (self)->begin_semantics (self);
}


void gcp_semantic_value_support_end_semantics (GcpSemanticValueSupport* self) {
	g_return_if_fail (self != NULL);
	GCP_SEMANTIC_VALUE_SUPPORT_GET_INTERFACE (self)->end_semantics (self);
}


static void gcp_semantic_value_support_base_init (GcpSemanticValueSupportIface * iface) {
	static gboolean initialized = FALSE;
	if (!initialized) {
		initialized = TRUE;
		g_signal_new ("semantic_values_updated", GCP_TYPE_SEMANTIC_VALUE_SUPPORT, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	}
}


GType gcp_semantic_value_support_get_type (void) {
	static volatile gsize gcp_semantic_value_support_type_id__volatile = 0;
	if (g_once_init_enter (&gcp_semantic_value_support_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GcpSemanticValueSupportIface), (GBaseInitFunc) gcp_semantic_value_support_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
		GType gcp_semantic_value_support_type_id;
		gcp_semantic_value_support_type_id = g_type_register_static (G_TYPE_INTERFACE, "GcpSemanticValueSupport", &g_define_type_info, 0);
		g_type_interface_add_prerequisite (gcp_semantic_value_support_type_id, GCP_TYPE_DOCUMENT);
		g_once_init_leave (&gcp_semantic_value_support_type_id__volatile, gcp_semantic_value_support_type_id);
	}
	return gcp_semantic_value_support_type_id__volatile;
}



