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


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


#define GCA_TYPE_SOURCE_INDEX (gca_source_index_get_type ())
#define GCA_SOURCE_INDEX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCA_TYPE_SOURCE_INDEX, GcaSourceIndex))
#define GCA_SOURCE_INDEX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GCA_TYPE_SOURCE_INDEX, GcaSourceIndexClass))
#define GCA_IS_SOURCE_INDEX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GCA_TYPE_SOURCE_INDEX))
#define GCA_IS_SOURCE_INDEX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GCA_TYPE_SOURCE_INDEX))
#define GCA_SOURCE_INDEX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GCA_TYPE_SOURCE_INDEX, GcaSourceIndexClass))

typedef struct _GcaSourceIndex GcaSourceIndex;
typedef struct _GcaSourceIndexClass GcaSourceIndexClass;

#define GCA_TYPE_DOCUMENT (gca_document_get_type ())
#define GCA_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCA_TYPE_DOCUMENT, GcaDocument))
#define GCA_DOCUMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GCA_TYPE_DOCUMENT, GcaDocumentClass))
#define GCA_IS_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GCA_TYPE_DOCUMENT))
#define GCA_IS_DOCUMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GCA_TYPE_DOCUMENT))
#define GCA_DOCUMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GCA_TYPE_DOCUMENT, GcaDocumentClass))

typedef struct _GcaDocument GcaDocument;
typedef struct _GcaDocumentClass GcaDocumentClass;

#define GCA_TYPE_SEMANTIC_VALUE_SUPPORT (gca_semantic_value_support_get_type ())
#define GCA_SEMANTIC_VALUE_SUPPORT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCA_TYPE_SEMANTIC_VALUE_SUPPORT, GcaSemanticValueSupport))
#define GCA_IS_SEMANTIC_VALUE_SUPPORT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GCA_TYPE_SEMANTIC_VALUE_SUPPORT))
#define GCA_SEMANTIC_VALUE_SUPPORT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GCA_TYPE_SEMANTIC_VALUE_SUPPORT, GcaSemanticValueSupportIface))

typedef struct _GcaSemanticValueSupport GcaSemanticValueSupport;
typedef struct _GcaSemanticValueSupportIface GcaSemanticValueSupportIface;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

typedef void (*GcaWithSemanticValueCallback) (GcaSourceIndex* diagnostics, void* user_data);
struct _GcaSemanticValueSupportIface {
	GTypeInterface parent_iface;
	GcaSourceIndex* (*begin_semantics) (GcaSemanticValueSupport* self);
	void (*end_semantics) (GcaSemanticValueSupport* self);
};



GType gca_source_index_get_type (void) G_GNUC_CONST;
GType gca_document_get_type (void) G_GNUC_CONST;
GType gca_semantic_value_support_get_type (void) G_GNUC_CONST;
void gca_semantic_value_support_with_semantics (GcaSemanticValueSupport* self, GcaWithSemanticValueCallback callback, void* callback_target);
GcaSourceIndex* gca_semantic_value_support_begin_semantics (GcaSemanticValueSupport* self);
void gca_semantic_value_support_end_semantics (GcaSemanticValueSupport* self);


void gca_semantic_value_support_with_semantics (GcaSemanticValueSupport* self, GcaWithSemanticValueCallback callback, void* callback_target) {
	GcaSourceIndex* sems = NULL;
	GcaSourceIndex* _tmp0_ = NULL;
	GcaWithSemanticValueCallback _tmp1_ = NULL;
	void* _tmp1__target = NULL;
	_tmp0_ = gca_semantic_value_support_begin_semantics (self);
	sems = _tmp0_;
	_tmp1_ = callback;
	_tmp1__target = callback_target;
	_tmp1_ (sems, _tmp1__target);
	gca_semantic_value_support_end_semantics (self);
	_g_object_unref0 (sems);
}


GcaSourceIndex* gca_semantic_value_support_begin_semantics (GcaSemanticValueSupport* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return GCA_SEMANTIC_VALUE_SUPPORT_GET_INTERFACE (self)->begin_semantics (self);
}


void gca_semantic_value_support_end_semantics (GcaSemanticValueSupport* self) {
	g_return_if_fail (self != NULL);
	GCA_SEMANTIC_VALUE_SUPPORT_GET_INTERFACE (self)->end_semantics (self);
}


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


GType gca_semantic_value_support_get_type (void) {
	static volatile gsize gca_semantic_value_support_type_id__volatile = 0;
	if (g_once_init_enter (&gca_semantic_value_support_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GcaSemanticValueSupportIface), (GBaseInitFunc) gca_semantic_value_support_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
		GType gca_semantic_value_support_type_id;
		gca_semantic_value_support_type_id = g_type_register_static (G_TYPE_INTERFACE, "GcaSemanticValueSupport", &g_define_type_info, 0);
		g_type_interface_add_prerequisite (gca_semantic_value_support_type_id, GCA_TYPE_DOCUMENT);
		g_once_init_leave (&gca_semantic_value_support_type_id__volatile, gca_semantic_value_support_type_id);
	}
	return gca_semantic_value_support_type_id__volatile;
}



